Re: Update to one of three values.

2003-03-17 Thread gerald_clark
Maybe I am missing something, but why not: UPDATE T SET T.Data = 1 WHERE . . . With only 2 fields, what could be in your WHERE clause? Hu Qinan wrote: >A table T contains two fields: T.ID, T.Data. > >I want to set its T.Data to one of three values: NULL, 0, 1 according to its T.ID. > >This is wh

Update to one of three values.

2003-03-14 Thread Hu Qinan
A table T contains two fields: T.ID, T.Data. I want to set its T.Data to one of three values: NULL, 0, 1 according to its T.ID. This is what I have done: 1. Set all Data to be NULL: UPDATE T SET Data = NULL; 2. Create a temporary table Temp to store some selected T.ID. Then update the Data of