1,105,447 Community Members

Help me

Member Avatar
engrmshahzad
Newbie Poster
3 posts since Nov 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

SELECT * FROM users WHERE birth_date between '%-02-02' AND '%-05-06'

Member Avatar
engrmshahzad
Newbie Poster
3 posts since Nov 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

not working

Member Avatar
pritaeas
mod_pritaeas
11,314 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
0
 

Assuming MySQL, see the docs here. BETWEEN requires a minimum and maximum value, and does not support a wildcard like LIKE does.

Member Avatar
JorgeM
IT Addict
6,413 posts since Dec 2011
Reputation Points: 581 [?]
Q&As Helped to Solve: 963 [?]
Skill Endorsements: 172 [?]
Moderator
Featured
Sponsor
 
0
 

Same goes for MSSQL. If you include the character string '%', MSSQL will generate an error.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: