sql will not work

Results 1 to 3 of 3

Thread: sql will not work

  1. #1
    Aku Guest

    Default sql will not work

    following error results as I try to sort records with order by after passing the "number" from previous script. sql works fine without the order by.<BR><BR>can anyone see the cause?<BR><BR>Microsoft VBScript compilation error &#039 800a0401&#039 <BR><BR>Expected end of statement <BR><BR><BR>sqlstmt = "SELECT cmodules.mcode, cmodules.level, modules.name, cmodules.ccode FROM modules INNER JOIN cmodules ON modules.code = cmodules.mcode WHERE cmodules.ccode=" & number order by level asc<BR>

  2. #2
    Nathan Pond Guest

    Default RE: sql will not work

    You got your quotes messed up, the order by wasn&#039t part of the query.<BR><BR>sqlstmt = "SELECT cmodules.mcode, cmodules.level, modules.name, cmodules.ccode FROM modules INNER JOIN cmodules ON modules.code = cmodules.mcode WHERE cmodules.ccode=" & number & " order by level asc"<BR><BR>Nathan Pond<BR>

  3. #3
    Aku Guest

    Default RE: sql will not work

    Thanks Nathan, We are back in business!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •