SQL and the "And" Statement?

Results 1 to 2 of 2

Thread: SQL and the "And" Statement?

  1. #1
    K. Zig Guest

    Default SQL and the "And" Statement?

    I am trying to have an ASP page lookup records from a database where three records must match from the selections that where made on previous pages. I have this SQL Statement:<BR><BR>&#060;%<BR>set Connect = Server.CreateObject ("ADODB.Connection")<BR>Connect.Open "project"<BR>Query = "Select* From project where Date = gotdate and Callocal = gotcallocal and Reclocal = gotreclocal"<BR> set strtime = Connect.Execute (Query)<BR>%&#062;<BR><BR>Will this work? If not how can I retrieve only records that match the three "Request.Form&#039s" that where collected from previous pages? <BR><BR>Thanks Alot<BR>K. Zig

  2. #2
    Join Date
    Dec 1969
    Posts
    866

    Default RE: SQL and the

    Looks like it should work right. You are of course inserting the variables correctly. i.e "...WHERE ColumnName = " & Variable & " AND ColumnName2 = " & variable2 & " etc.....<BR><BR>That&#039s all I saw that might have caused any problems.

Posting Permissions

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