Home » RDBMS Server » Server Administration » Re: who to search patterns ([0-9] or [a-z]) in sql
Re: who to search patterns ([0-9] or [a-z]) in sql [message #372713] Sun, 04 March 2001 22:20 Go to next message
jimmy
Messages: 21
Registered: November 2000
Junior Member
I'm only a college student, so you'll forgive me if I'm wrong, but I think the SQL syntax you are
looking for is something like this:

SELECT column_name
FROM table_name
WHERE column_name LIKE 'S00_'
AND column_name IN ('S00A','SOOB','SOOC',...etc);

You've probably alreadly came up this one and was looking for something way more efficient and less of a hassle to write.

Hope that helped.
Re: who to search patterns ([0-9] or [a-z]) in sql [message #372714 is a reply to message #372713] Sun, 04 March 2001 23:59 Go to previous message
vinay
Messages: 27
Registered: December 1999
Junior Member
Hi,

WHERE column_name LIKE 'S00_'
AND column_name IN ('S00A','SOOB','SOOC',...etc);

Above syntax works but here I need to give all combinations ('S00A','S00B',....,'S00Z')

Is there better way of doing this

Thanks for the reply
Previous Topic: HOW TO CONVERT NUMBER TO WORD FORMAT WHERE NUMBER HAVING MORE THEN 5373484
Next Topic: sure this will work as per babu's view.
Goto Forum:
  


Current Time: Sat Jun 29 13:57:38 CDT 2024