构成一个简单的SQL语句

flyingzl 2003-03-15 10:18:22
我想做一个查询,语句是这样写的
adoquery1.SQL.Add('select storebill_no,dress_name,quantity,sum_price from store_inout_table where storebill_date>'+strtodate(edit1.text)+'and'+'storebill _date<'+strtodate(edit2.Text);
不知错在哪里运行不过去,还请指教
...全文
13 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
YuWeihu 2003-03-15
  • 打赏
  • 举报
回复
用format 引用参数
flyingzl 2003-03-15
  • 打赏
  • 举报
回复
我运行时它还是提示有语法错误,不知为什么,请指教
dschebei 2003-03-15
  • 打赏
  • 举报
回复
delphi的'太不好用了,还是用参数吧!
Summer1314 2003-03-15
  • 打赏
  • 举报
回复
adoquery1.sql.add('select storebill_no,dress_name,quantity,sum_price from store_inout_table where storebill_date>'+''''+edit.text+''''+' and storebill_date<'+''''+edit2.text+'''');
lincanwen 2003-03-15
  • 打赏
  • 举报
回复
adoquery1.SQL.Add('select storebill_no,dress_name,quantity,sum_price from store_inout_table where storebill_date>'''+edit1.text+''' and storebill _date<'''+edit2.Text + '''');

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧