<%
strSql = ""
strSql = strSql & " SELECT "
strSql = strSql & " A.* "
strSql = strSql & " FROM "
strSql = strSql & GLOBAL_DB_TRADEPRODUCT & " A "
strSql = strSql & " LEFT OUTER JOIN "
strSql = strSql & GLOBAL_DB_TRADEPRODUCTBC & " B "
strSql = strSql & " ON "
strSql = strSql & " A.INT_BID = B.INT_BID "
strSql = strSql & " LEFT OUTER JOIN "
strSql = strSql & GLOBAL_DB_TRADEPRODUCTSC & " C "
strSql = strSql & " ON "
strSql = strSql & " A.INT_SID = C.INT_SID "
strSql = strSql & " WHERE "
strSql = strSql & " A.CHR_AUDITING = '1' "
strSql = strSql & " ORDER BY "
strSql = strSql & " B.INT_ORDER DESC "
strSql = strSql & " ,B.DAT_CREATETIME DESC "
strSql = strSql & " ,C.INT_ORDER DESC "
strSql = strSql & " ,C.DAT_CREATETIME DESC "
strSql = strSql & " ,A.INT_ORDER DESC "
strSql = strSql & " ,A.DAT_CREATETIME DESC "%>
我想把这个左连接换成其他方式 就是能支持asp的形式的 要如何去改? 我原来是asp+sql的 现在是asp+access的 这个不好用了 如何能让他好用那 -0- 

解决方案 »

  1.   

    LEFT JOIN 多加些括号。具体语法还得找资料
      

  2.   

    <%
    strSql = ""
    strSql = strSql & " SELECT "
    strSql = strSql & " A.* "
    strSql = strSql & " FROM (("
    strSql = strSql & GLOBAL_DB_TRADEPRODUCT & " A "
    strSql = strSql & " LEFT OUTER JOIN "
    strSql = strSql & GLOBAL_DB_TRADEPRODUCTBC & " B "
    strSql = strSql & " ON "
    strSql = strSql & " A.INT_BID = B.INT_BID )"
    strSql = strSql & " LEFT OUTER JOIN "
    strSql = strSql & GLOBAL_DB_TRADEPRODUCTSC & " C "
    strSql = strSql & " ON "
    strSql = strSql & " A.INT_SID = C.INT_SID )"
    strSql = strSql & " WHERE "
    strSql = strSql & " A.CHR_AUDITING = '1' "
    strSql = strSql & " ORDER BY "
    strSql = strSql & " B.INT_ORDER DESC "
    strSql = strSql & " ,B.DAT_CREATETIME DESC "
    strSql = strSql & " ,C.INT_ORDER DESC "
    strSql = strSql & " ,C.DAT_CREATETIME DESC "
    strSql = strSql & " ,A.INT_ORDER DESC "
    strSql = strSql & " ,A.DAT_CREATETIME DESC "%>