如何在一个字符串中插入字符串???

net_net 2007-03-06 09:14:47
Select strNo,strName From aa Where group by strNo
把strDate=2007-03-01'插入Where 后面怎么实现???
...全文
229 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengjijia 2007-03-06
  • 打赏
  • 举报
回复
dim strsql as string
strsql="Select strNo,strName From aa where 1=1"
if strDate<>"" then
strsql=strsql&" and strDate='2007-03-01'"
end if
strsql=strsql&" group by strNo"
shuaishen12 2007-03-06
  • 打赏
  • 举报
回复
s = "Select strNo,strName From aa Where strNo='01' group by strNo"
s = replace(s, " group by ", "strDate='2007-03-01' group by ")
net_net 2007-03-06
  • 打赏
  • 举报
回复
有的已经有Where条件了
Select strNo,max(strName)name From aa Where strNo='01' Group by strNo
有时可能需要在Where strNo='01'之后插入字符串
jadeluo 2007-03-06
  • 打赏
  • 举报
回复
s = "Select strNo,strName From aa Where group by strNo"
s = replace(s, "Where ", "Where strDate='2007-03-01' ")

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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