Skip to Content
0
Former Member
Apr 29, 2007 at 01:42 PM

update expression for only one row in the table

31 Views

Hi,all

I need to update only one row in my table,

which sql expression can I use?

For example,I do the following:

sqlString = "UPDATE PivotTitle SET type = CASE WHEN (type = 2) THEN 1 WHEN (type = 3) THEN 2 WHEN (type = 4) THEN 3 ELSE type END"

The problem is that I have one row of each type(1,2,3) and many rows of

type 4,but I need to update only one row of type 4 to row of type 3.

Regards,

Michael