|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using wildcard %
Hi there
I have the following SQL statement that I use in my ASP page: SQL = "SELECT * FROM tbllogjob WHERE emails = '%" & myquery & "%' ORDER BY logjobid DESC " The problem is when i run this query through my ASP page using an Access database I get results but when I try to use on SQL 2000/2005 and MySQL I don't get any results. Anyone could help me with this please? Thanks
__________________
If this help you please show your gratitude by adding reputation points. Thanks JonyBravo Last edited by jonyBravo : November 4th, 2009 at 10:14 AM. Reason: Ameding wrong speling |
|
#2
|
||||
|
||||
|
Hi, you can't use wildcards with equals, you need to use like, eg:
Code:
SQL = "SELECT * FROM tbllogjob WHERE emails LIKE '%" & myquery & "%' ORDER BY logjobid DESC " |
|
#3
|
|||
|
|||
|
Thank you very much, problem solved
|
|
#4
|
||||
|
||||
|
Quote:
![]() |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Using wildcard % |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|