sql总是提示有语法错误,

2024-12-30 09:36:55
推荐回答(2个)
回答1:

可能是少了空格,试试:在每个字符串结束的双引号之前增加一个空格,或每个字符串开始的双引号之后增加一个空格。

回答2:

lcSql = "select hp_zd01.zgbh,hp_zd01.zgxm,hb_jbxx.tsbh,hb_jbxx.mc,hb_jyxx.jyrq,hb_jyxx.yhrq from hb_jyxx left join hb_jbxx on hb_jyxx.tsbh = hb_jbxx.tsbh left join hp_zd01 on hp_zd01.zgbh = hb_jyxx.zgbh where hb_jyxx.yhrq < '" & lcdate & "' And hb_jyxx.ghrq is null"