View previous topic :: View next topic
|
Author |
Message |
ajayvamsi
New User
Joined: 21 Jul 2005 Posts: 56 Location: Hyderabad
|
|
|
|
Hi Friends,
My requirement is I need to pick all the names in a column which r having percentage symbol in between the names...!!
Example::
let us suppose I have a table xyz with Name,Age as fields
Name Age
aaa%aaa 11
bbbbbbbb 12
cc%ccccc 45
d%ccccc 12
please help me to write a query to pick out all the Names like::
aaa%aaa
cc%ccccc
d%ccccc
Thanks in advance,
ajay |
|
Back to top |
|
|
chowdamhemalatha
New User
Joined: 25 Sep 2005 Posts: 2 Location: bangalore
|
|
|
|
Hi,
u can use LIKE clause in the SELECT stmt as shown below.
SELECT col1 FROM tab1 WHERE col1 LIKE '_%%'
Rgds,
Hema. |
|
Back to top |
|
|
reshma
New User
Joined: 10 Sep 2005 Posts: 9 Location: software engineer
|
|
|
|
hema,
i was confused with ur query ..in the above said query by u ,u should have mentioned where col1 like '_%%%' ....tell me if iam wrong
regards,
reshma |
|
Back to top |
|
|
ajayvamsi
New User
Joined: 21 Jul 2005 Posts: 56 Location: Hyderabad
|
|
|
|
Hema,
I am confused with the query..!! I heard that we need to go usling for "Escape"
Please correct here
select name from xyz where name like '%+%sdfdf' escape '+';
Is this wrong...!! |
|
Back to top |
|
|
|