Re: Question about Update multiple columns at once

2004-08-20 Thread Michael Stassen
Monet wrote: I thought about this method before. But since there are 6 sets of rows I want to update in one table and they are common at some level, I am wondering whether there is more efficient way to do it. Thanks, From what you've told us, I don't think so. By "common at some level," do you mea

Re: Question about Update multiple columns at once

2004-08-19 Thread Monet
I thought about this method before. But since there are 6 sets of rows I want to update in one table and they are common at some level, I am wondering whether there is more efficient way to do it. Thanks, --- Michael Stassen <[EMAIL PROTECTED]> wrote: > Assuming that column Q3F in your example i

Re: Question about Update multiple columns at once

2004-08-18 Thread Michael Stassen
Assuming that column Q3F in your example is really Q2F, the query is doing exactly what you told it to do. Rows which match your WHERE clause are being updated according to your SET clause. As I understand you, there are two different sets of rows you wish to update. The first set are the row

Question about Update multiple columns at once

2004-08-18 Thread Monet
I’m trying to update multiple columns at once but cann’t do it in an efficient way. What I am trying to do is: Update table temp, When: ( Q1A=1 AND Q1E=1 AND Q1F=1 AND Q1G IN (‘’,”NA”) ) THEN SET (Q1E=6,Q1F=5, Q1G=999), OR When ( (Q2A=1 AND Q2E=1 AND Q2F=1 AND Q2G IN (‘’,’NA’) THEN SET (Q2E=6,Q2