Results 1 to 2 of 2

Thread: SQL Select statement

  1. #1

    Thread Starter
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    If you are querying SQL server, you need to use a percent sign % as a wildcard in your like statement

  2. #2
    Member
    Join Date
    Jan 2000
    Posts
    51

    Post

    This is and ASP ADO SQL statement
    <%
    myDSN="DSN=INVENTORY;User Id=invuser;password=invpassword"
    set conntemp=server.createobject("adodb.connection")
    conntemp.Open myDSN

    mySQL="select * from MAIN WHERE [WORKSTATION NAME]"
    mySQL= mySQL & " LIKE'"
    mySQL= mySQL & EDITLISTNAME & "'"

    scriptresponder="editlist2.asp"

    'set conntemp=server.createobject("adodb.connection")
    'conntemp.open myDSN
    set rstemp=conntemp.execute(mySQL)
    %>

    The result didn't return anything. Did I do something wrong with SQL LIKE statment?

    Thanks...

Posting Permissions

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



Click Here to Expand Forum to Full Width