更新查询问题 [英] Update query problem

查看:49
本文介绍了更新查询问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我需要查询来更新给定的数据.


例如:

bthno Ihfrm Ihto日期
1212231空
2121121空
2122123空
2124125空
3211314空


我写了一个查询,如

将更新标签名设置为Date =''2012年2月23日'',其中Ihfrm =''121''和Ihto =''125'',但它不起作用.

我想要像
这样的输出
bthno Ihfrm Ihto日期
1212231空
2 121 121 23/02/2012
2122123 2012年2月23日
2 124 125 23/02/2012
3211314空



任何帮助,将不胜感激..


Hi

I need a query to update the given data.


For eg:

bthno Ihfrm Ihto Date
1 212 231 Null
2 121 121 Null
2 122 123 Null
2 124 125 Null
3 211 314 Null


and i wrote a query like

Update tabname set Date=''23/02/2012'' where Ihfrm=''121'' and Ihto=''125'' but it is not working.

And i want output like

bthno Ihfrm Ihto Date
1 212 231 Null
2 121 121 23/02/2012
2 122 123 23/02/2012
2 124 125 23/02/2012
3 211 314 Null



Any help would be appreciated..

推荐答案

更新标签名设置为Date =''2012年2月23日",其中Ihfrm =" 121和Ihto =" 125"'

确保这两个值(Ihfrm和Ihto)都是字符串类型.
Update tabname set Date=''23/02/2012'' where Ihfrm=''121'' and Ihto=''125''

Ensure both these values (Ihfrm and Ihto) are string types.


这篇关于更新查询问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆