如何在一个字符串中插入字符串???
Select strNo,strName From aa Where group by strNo
把strDate=2007-03-01 '插入Where 后面怎么实现???
[解决办法]
s = "Select strNo,strName From aa Where group by strNo "
s = replace(s, "Where ", "Where strDate= '2007-03-01 ' ")
[解决办法]
s = "Select strNo,strName From aa Where strNo= '01 ' group by strNo "
s = replace(s, " group by ", "strDate= '2007-03-01 ' group by ")
[解决办法]
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 "