请教一句sql语言,老是说我格式不对,很简单,搞了一晚上,大家帮帮忙!
sql.add('select count(*) from department where custno in (select custom from customtalbe where Ship='+adoquery1.fieldbyname('Ship').Asstring));
就是引号的问题,我不知道该怎么用引号,查书也没查到,请问有相关资料让我 学习学习吗?非常感谢!
sql.add('select count(*) from department where custno in (select custom from customtalbe where Ship='+adoquery1.fieldbyname('Ship').Asstring));
就是引号的问题,我不知道该怎么用引号,查书也没查到,请问有相关资料让我 学习学习吗?非常感谢!
解决方案 »
- 怎么把form1的一个变量传到form2去啊?
- 怎样去掉DELPHI的及时调式功能呀(程序一有错就冒出个DELPHI跳入内存了也不询问)~~
- 精度问题!急在线等!!!!!谢谢各位帮忙!
- 高分求助,有没有人见过一个叫TTF160_TLB的pas或dcu文件?在哪儿可以找到
- 怎样看到ClientSocket的源代码?
- remobjects 三层 怎么保持图片到数据库
- 求delphi Exe程序A使用已经存在的独立资源文件B 解决方案
- 日期格式怎么变了?
- 怎样判断某一字段名称在表中是否存在?
- SOS!如何利用QUERY的INSERT命令保存DBGRID中的数据?
- 关于UPDATE语句的问题
- 求问DELPHI+ACCESS模式如何实现网络多台电脑同时进行软件的使用?
如果你的数据库是access的话就用
sql.add('select count(*) from department where custno in (select custom from customtalbe where Ship=''' + adoquery1.fieldbyname('Ship').Asstring + ''')');
如果是ms sql server 2000 就用sql.add('select count(*) from department where custno in (select custom from customtalbe where Ship='+adoquery1.fieldbyname('Ship').Asstring+')');