Click here to Skip to main content
15,885,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone convert this to a mysql statement that works

SQL
select * from dbo.T_Recipients where Company_Name = 'ACSA' and User_Name = 'Arend' and Full_Name like '%A%'
Posted
Updated 22-Oct-12 21:44pm
v2
Comments
OriginalGriff 23-Oct-12 3:46am    
What doesn't work about it?
mrDivan 23-Oct-12 3:53am    
Hi Again

It works if I run this in Microsoft sql on the database but when I run the same statement on the same database in mySql it doesnt return any results
BlackMilan 23-Oct-12 5:16am    
Without details of tool and version no help is possible.
I tested with MySQL Workbench 5.2.40 - no problem

SQL
select * 
from T_Recipients 
where Company_Name = 'ACSA' 
and User_Name = 'Arend' 
and Full_Name like '%A%';
 
Share this answer
 
Comments
mrDivan 23-Oct-12 3:54am    
ThaNKS IT DOESNT WORK
Herman<T>.Instance 23-Oct-12 3:57am    
what is the error you get?
mrDivan 23-Oct-12 4:02am    
Hi Again

It works if I run this in Microsoft sql on the database but when I run the same statement on the same database in mySql it doesnt return any results
CPallini 23-Oct-12 4:25am    
Did you get any error?
Herman<T>.Instance 23-Oct-12 5:21am    
does your mysql database contain the same tables and data?
did you debug your query by running it without where, with only the where line, then with where and the first AND line.
Check in each step if you get data.
Hello Divan,

first you should read this link:

http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html[^]

regards
sarva
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900