abhidotnet/sqlforce

Error updating a column to the values of another column

GoogleCodeExporter opened this issue · 2 comments

What steps will reproduce the problem?
1. run the following query: update Product2 set family = Product_Line_Desc__c 
from Product2 where family is null;

What is the expected output? What do you see instead?
The column Family should now have the values of the custom column 
Product_Line_Desc__c.

What version of the product are you using? On what operating system?
sqlforce_1.20.5

Please provide any additional information below.
What the query is doing is updating the Family field to the string 
Product_Line_Desc__c instead of the values in the column Product_Line_Desc__c.  
NOTE that Product_Line_Desc__c is a custom field so you will need to create one 
in your system an give it some values before running the update.

Original issue reported on code.google.com by fporr...@yahoo.com on 7 Jul 2011 at 5:26

sqlforce does support update used this way. The assigned value has to be a 
constant.

The way I solve a problem like this is with the sqlforce Jython module. I will 
post an example on my blog this weekend.

Original comment by gsmithfarmer on 8 Jul 2011 at 1:56

A Jython problem

Original comment by gsmithfarmer on 23 Apr 2012 at 1:48

  • Changed state: Done