![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
maybe I am doing it wrong. they want a query incase they find more of this stuff. I did this in an update query IIf([q1]>0,[q1],Null) I will do it like you did in sql and try that |
#12
| |||
| |||
|
|
Is the field in the original table a primary key, or set to not allow Null? "sparks" <sparks (AT) home (DOT) com> wrote in message news:fhhla7l0jkde9n51doe0f9tke7lv81pbkk (AT) 4ax (DOT) com... this is just too weird. I can not update the values in the table. BUT I can copy the table into a new table and then run the same update query and it works. What, or Why would it do this? On Fri, 28 Oct 2011 07:18:49 -0500, sparks <sparks (AT) home (DOT) com> wrote: just tried this UPDATE table1 SET q1 = null WHERE [q1]<=0; you tried to assign the Null value to a variable tht is not a Variant data type. On Thu, 27 Oct 2011 09:56:09 -0400, "Bob Barrows" reb01501 (AT) NOyahooSPAM (DOT) com> wrote: sparks wrote: We had a guy here make determinations on a table(s) and replaced missing values with numbers. something like if missing -9, unsure -3, etc so now they have several tables with junk in them. how can I replace all of these new values he put in with null in number fields. I know if a query it will say you cant replace with null because variable is not a variant. I just need to replace all values <0 with null in the tables. what are you talking about? update tablename set fieldname = null where fieldname<0 I just tested it to be sure and it works fine. |
#13
| |||
| |||
|
|
... with no primary key but all the _variables_ ... ... on the _variables_ or something like that. ... |
![]() |
| Thread Tools | |
| Display Modes | |
| |