Access sql中的嵌套IF语句(asp经典)

时间:2015-12-12 17:41:52

标签: sql if-statement asp-classic

我想找到一种方法在我的ADO对象中使用IF语句合并以下4个查询(在mdb数据库上)

    SELECT * FROM promo WHERE cocategory = 'ri' and codart = '00010089' and costart <= date() and coend >= date() and copre >= 1 order by copre asc
    SELECT * FROM promo WHERE cocategory = 'ri' and codart = '00010089' and costart <= date() and coend >= date() and copr is not null
    SELECT * FROM milis WHERE codelis = '3' and codart = '00010089' and listart < date() and liend > date() and liqta > 0 order by liqta asc
    SELECT * FROM milis WHERE codelis = '3' and codart = '00010089' and listart < date() and liend > date()
从第一个查询获取EOF(空),获取第二个等等......直到其中一个返回记录。

0 个答案:

没有答案