find names form the table [message #355201] |
Thu, 23 October 2008 02:04 |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
i have a table emp with a column name
i want to write a query that will give me name starting with la,lb,lc.... till ls.
names starting with lt or later wont come.
how to write a query for that?
|
|
|
find names from table [message #355202 is a reply to message #355201] |
Thu, 23 October 2008 02:06 |
swas_fly
Messages: 220 Registered: March 2008 Location: Bhubaneswar
|
Senior Member |
|
|
i have a table emp with a column name
i want to write a query that will give me name starting with la,lb,lc.... till ls.
names starting with lt or later wont come.
how to write a query for that?
|
|
|
Re: find names from table [message #355203 is a reply to message #355201] |
Thu, 23 October 2008 02:16 |
|
rajavu1
Messages: 1574 Registered: May 2005 Location: Bangalore , India
|
Senior Member |
|
|
coumn_name like 'l%' and
Not like 'lt%' and
Not like 'lu%' ....
Or
SUBSTR(coumn_name,1,1) ='l' and
SUBSTR(coumn_name,2,1)NOT in ('t','u','v','w','x','y','z')
Excuse me for performance impact
Rajuvan.
[Updated on: Thu, 23 October 2008 02:19] Report message to a moderator
|
|
|
|
|
|
Re: find names from table [message #355208 is a reply to message #355203] |
Thu, 23 October 2008 02:39 |
|
rajavu1
Messages: 1574 Registered: May 2005 Location: Bangalore , India
|
Senior Member |
|
|
rajavu1 wrote on Thu, 23 October 2008 12:46 |
coumn_name like 'l%' and
Not like 'lt%' and
Not like 'lu%' ....
Or
SUBSTR(coumn_name,1,1) ='l' and
SUBSTR(coumn_name,2,1)NOT in ('t','u','v','w','x','y','z')
Excuse me for performance impact
|
Rajuvan.
|
|
|
|
|
|
|
|
|