Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ASP 3.0 : Need help with Select LIKE statement and % wildcard Signup · Login
Author Thread
Need help with Select LIKE statement and % wildcard
Posted in tutorial: An ASP Tutorial to create your own Database driven Search Engine
·  cageybee
User
Joined: 30 Jun 2003
Total Posts: 1
Need help with Select LIKE statement and % wildcard
Posted: 30 Jun 2003
I've been making a site with a database. I want people to be able to browse the database by selecting the first letter of the word.

But I can't get it to work.

Here is my select statement:-
Set oRs = oConn.Execute (" select * from link_data where link_name like '" & letter & "%' ")

Here is the error I recieve:-
Syntax error (missing operator) in query expression 'link_name like ''p'%''

Any ideas?

Cheers,
The Cageybee
·  Salsa
UserUser
Joined: 6 Mar 2003
Total Posts: 10
extra quatation :)
Posted: 2 Jul 2003
actually u'd be astonished to realise u were a bit jumpy to post ur question :)
u have inserted an extra ' in ur select statement, it should look like this 'p%' , the good news is .. ur syntax is ok, the bad news is .. ur varriable (letter) cought an extra quatation through god knows where operation, the problem with that is , u need to post ur full script for audition of how ur letter varriable was assigned

Users Who Have Visited This Thread In Last 24 Hours
3 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.