[SQL] order of multiple assignments in UPDATE

2001-04-29 Thread Anuradha Ratnaweera
If I have a query UPDATE tablename SET c1 = 10 - c2, c2 = 4 where ... will the two assignments be evaluated from left to right? Thanks in advance. Anuradha ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an app

[SQL] Re: Heres a good one...

2001-04-29 Thread Anuradha Ratnaweera
First, posting_date in journal can _NOT_ be of type char(4)! I guess it is a "date". Try update journal set gl_update_flag='Y' from distrib where journal.gl_update_flag = 'H' and journal.posting_date <= '2001-03-31' and (journal.objectid = distrib.distrib_objectid or journal.objectid = distrib.

[SQL] Re: order of multiple assignments in UPDATE

2001-04-29 Thread Ossie J. H. Moore
While I'm not sure specificly which order they will be determined in, it has no effect on what the value of "c1" will be. The value of "c1" will be 10 minus the value of "c2" where "c2" equals the value it was before the update occurred. For exmple... 1. Assume you create the following table...