Click here to Skip to main content
15,913,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to use %wildcards in where Clause..

I couldnt get exact Result..

i was used this Query

select * from tbl_tree where sponcer_id like '%'(select distinct(sponcer_id) from tbl_tree where advisor_id=29)

the sponcer_id may be like '29,20,25,0'

i wanna get the value where the last value in a column like the sponcerid not exactly this value only the last four value should be like this..

Help..!!!
Posted

1 solution

I'm thinking you want IN rather than LIKE.
If not, a JOIN will likely do what you want.


P.S. I prefer to avoid subqueries.
 
Share this answer
 
v2

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