Using the Minus keyword

Results 1 to 2 of 2

Thread: Using the Minus keyword

  1. #1
    Join Date
    Dec 1969

    Default Using the Minus keyword

    G&#039;day All<BR><BR>I have this SQL statement<BR> sql1 = "select UserID from users "&_<BR> "minus "&_<BR> "select userID from TblLunch"<BR>embedded within my ASP page, but It doesn&#039;t allow me to display the table, this is what message I get:<BR>"Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR>[Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in FROM clause. "<BR>does ASP allow you to use sql statements with the minus keyword ??<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Using the Minus keyword

    I&#039;m not sure what you are trying to achieve. Do you want to get all userIDs from your users table where they are NOT in the TblLunch table ?<BR><BR>If so, try this:<BR><BR>Select UserID from users WHERE users.UserID Not In (Select UserID from TblLunch)

Posting Permissions

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