select 语句语法错误

luoxb 2005-06-17 09:09:26
以下是select嵌套语句在delphi中编译提示嵌套错误,我修改了很久,总是相同提示。我真不知道那里出错了,请高手指点
select id,number from kccount where depotid= (select Id from depot where type=''内部'')'+' and goodsid='+''''+ IMPSG_DATA.Cells[1,I_temp]+''''
...全文
98 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
xdhou 2005-06-17
  • 打赏
  • 举报
回复
楼主的错可能在于select Id from depot where type=''内部''返回了多条纪录
rfq 2005-06-17
  • 打赏
  • 举报
回复
select id,number from kccount where depotid in (select Id from depot where type=''内部'')'+' and goodsid='+''''+ IMPSG_DATA.Cells[1,I_temp]+''''
--看看这个
duanduan1122 2005-06-17
  • 打赏
  • 举报
回复
建议将它生成sql语句,在查询分析器中执行,看看报什么错。
duanduan1122 2005-06-17
  • 打赏
  • 举报
回复
什么错误?

34,593

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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