PDA

Click to See Complete Forum and Search --> : SQL Select statement


Clunietp
Feb 2nd, 2000, 12:24 AM
If you are querying SQL server, you need to use a percent sign % as a wildcard in your like statement

ptran
Feb 2nd, 2000, 11:51 AM
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...