10-13-2009 08:06 AM
Hi
Hopefully some one can help me.
I need to write an UPDATE query that checks the value of column "Height" and then multiplies the value of coloumn "Length" accordingly.
Is there some way of doing this in one query ?
Example :
update Table1 set FieldInUse = 1 where (if (Height=1) then Xposition = Length*16));
10-13-2009 10:00 AM
i am not sure i understand your question. i would try this: (not tested, i don't have a database at hand)
UPDATE table1 SET fieldinuse = 1, xposition = length*16 WHERE height = 1;
anyway, can you describe more precisely what you are trying to achieve ?