Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


using recordset in 'LIKE' query (sql)

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,42073
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> using recordset in 'LIKE' query (sql)
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 using recordset in 'LIKE' query (sql) - 1/16/2007 4:02:04 AM   
  darkmunk

 

Posts: 4
Score: 0
Joined: 1/16/2007
Status: offline
trying to search a DB for all records within a range.
I have a recordset containing about 10 postcodes and I need to find all the records in a different Table containing any one of those postcodes
currently I have:


Code:
sqlString= "SELECT aucTitle FROM tblAPAuctions WHERE aucPostalCode LIKE '%" & left(rsPostcodeResult.Fields, 4) & "%'"

but I am getting 'Wrong number of arguments or invalid property assignment ' error.

Thanks for looking
Mark

< Message edited by darkmunk -- 1/16/2007 6:41:58 AM >
 
 
Post #: 1
 
 RE: using recordset in 'LIKE' query (sql) - 1/16/2007 9:22:15 PM   
  darkmunk

 

Posts: 4
Score: 0
Joined: 1/16/2007
Status: offline
this code will loop thru a recordset and use each postcode in a new 'Like' query

      

(in reply to darkmunk)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> using recordset in 'LIKE' query (sql) Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts