dim str
str=request.form("uname")
conn.execute "update table set user='"&str&"' where id=1"
改变字段user的内容,如果user为空的话,直接赋值,如果user不为空的话,用,隔开后添加新值,譬如:值1,值2请教带判断的这个sql语句怎么写呢?
请教。
str=request.form("uname")
conn.execute "update table set user='"&str&"' where id=1"
改变字段user的内容,如果user为空的话,直接赋值,如果user不为空的话,用,隔开后添加新值,譬如:值1,值2请教带判断的这个sql语句怎么写呢?
请教。
update table set user=
case when user is null then '"&str&"' else '值1'+'值2' end
where id=1
update PriceSpotTable set Unumber= case when Unumber is null then '123' else Unumber+','+'123' end where SpotID=48
如果Unumber为空,则直接赋值,如果不为空,则在原来的值的基础上加逗号,在赋值。
显示错误:语法错误,操作符丢失。
update PriceSpotTable set Unumber_2= iif(Unumber_2 is null, '123' , Unumber_2+','+'123') where SpotID=48