表里两个字段earth_no和child_no,想将他们联合起来查询
即假设earth_no='1-23',child_no='001'
现在edit中输入1-23-001,可以查到这条记录,输入1-23可以查到所有earth_no为1-23的记录sql.add('select * from record where ...... like :temp');
parambyname('temp').asstring:='%'+keyEdit.Text+'%';
想请教的是where这里怎么写?
...where earth_no+'-'+child_no like...
这样好象不行
不知道知道字符怎么连接,还有就是单引号的问题
搞晕了,请大家指导一下:)
即假设earth_no='1-23',child_no='001'
现在edit中输入1-23-001,可以查到这条记录,输入1-23可以查到所有earth_no为1-23的记录sql.add('select * from record where ...... like :temp');
parambyname('temp').asstring:='%'+keyEdit.Text+'%';
想请教的是where这里怎么写?
...where earth_no+'-'+child_no like...
这样好象不行
不知道知道字符怎么连接,还有就是单引号的问题
搞晕了,请大家指导一下:)
解决方案 »
- 急!!!让fastreport指定打印机(frReport1.ChangePrinter() 此方法怎么使用)
- MIDAS程序打包要包括那些文件?
- FSMDIFORM问题
- 请问哪里有可以播放flash的控件?
- 如何对写字板操作,如对写字板中符合要求的某一行进行筛选等
- 前途迷茫!!!
- 当把鼠标放在EDIT上然后出现一个黄色的小提示是怎么做的,怎么把中文写在提示里面
- 请大家介绍一下Delphi编程的各种规范!
- delphi程序最小化后如何常驻内存执行(在屏幕右下角)?
- 请教各路大侠,我在TDBGrid中,要把所有记录的第二个字段值相加,赋给count:integer怎么提出TDBGrid中的值?
- 如何实现每次只显示20行记录
- 关于组件published中使用数组的问题:
sql.add('select * from record where earth_no' +'_' +'child_no like :temp');
parambyname('temp').asstring:='%'+keyEdit.Text+'%';