Jump to content

Sql Query A Query


Recommended Posts

Posted

like and in combination vadavachha? evaraina vaadara?
Ex

select * from emp where emp_name like ('%samyu%,%tara%' , %xxx%)

ala raaya vachha?

Posted

[quote name='Chitti_the_ROBO3' timestamp='1381411742' post='1304387409']
NO
[/quote]
mari ela

like %xxx% and like '%ggg%'

ilana ...sql kampu ayyipothundi kada?

Posted

[quote name='cherlapalli_jailer' timestamp='1381411533' post='1304387396']
like and in combination vadavachha? evaraina vaadara?
Ex

select * from emp where emp_name like ('%samyu%,%tara%' , %xxx%)

ala raaya vachha?
[/quote]
OR ani use cheyali

Posted

[quote name='cherlapalli_jailer' timestamp='1381411836' post='1304387412']
mari ela

like %xxx% and like '%ggg%'

ilana ...sql kampu ayyipothundi kada?
[/quote]

I mean don't use samyu name & tara name ani [img]http://25.media.tumblr.com/4edf07f444d1c672a842a2fca4194e82/tumblr_mqiz99Clrl1spvnemo1_250.gif[/img][img]http://25.media.tumblr.com/4edf07f444d1c672a842a2fca4194e82/tumblr_mqiz99Clrl1spvnemo1_250.gif[/img]

Posted

[quote name='cherlapalli_jailer' timestamp='1381411533' post='1304387396']
like and in combination vadavachha? evaraina vaadara?
Ex

select * from emp where emp_name like ('%samyu%,%tara%' , %xxx%)

ala raaya vachha?
[/quote]
in is used for multiple variables ... in (samyu, samanth,pinky) etc..

but Like can only be used to identify a pattern... like(samyu%) ...inka mutliple pettalev..
but what you can do is use OR..

select * from emp where emp_name like (samyu%)
or
select * from emp where emp_name like (pinky%)
or
select * from emp where emp_name like (Samantha%)

please correct me if im wrong

Posted

[quote name='cherlapalli_jailer' timestamp='1381411533' post='1304387396']
like and in combination vadavachha? evaraina vaadara?
Ex

select * from emp where emp_name like ('%samyu%,%tara%' , %xxx%)

ala raaya vachha?
[/quote]


do like this noo

[color=#282828][font=helvetica, arial, sans-serif]select * from emp where emp_name like ('%samyu%) or [/font][/color][color=#282828][font=helvetica, arial, sans-serif]emp_name like ('%xxxxx%) or [/font][/color][color=#282828][font=helvetica, arial, sans-serif]emp_name like ('%yyyy%)[/font][/color]

Posted

Select * from emp where emp_name like 'samyu%' and emp_name like 'tara%' and emp-name like 'xxx%'

Ilagithe query will be executed good...

Posted

select * from emp where emp_name like '%samyu% OR LIKE %tara%' OR LIKE %xxx%

this should work

Posted

[quote name='MandhuMarbalaM' timestamp='1381411901' post='1304387418']
in is used for multiple variables ... in (samyu, samanth,pinky) etc..

but Like can only be used to identify a pattern... like(samyu%) ...inka mutliple pettalev..
but what you can do is use OR..

select * from emp where emp_name like (samyu%)
or
select * from emp where emp_name like (pinky%)
or
select * from emp where emp_name like (Samantha%)

please correct me if im wrong
[/quote]

or kaadu we can use and
but
bayya ila ayithe ...SQL doesn't look good kada..if i want to keep on adding on the fly...then it will be a big headache/issue

Posted

Select * from emp where emp_name like 'samyu%' or emp_name like 'tara%' or emp-name like 'xxx%'

Ilagithe query will be executed good...

Posted

[quote name='littlemoon' timestamp='1381411894' post='1304387414']
OR ani use cheyali
[/quote]


[size=4][color=#282828][font=helvetica, arial, sans-serif][background=rgb(247, 247, 247)]select * from emp where emp_name like %AA% OR emp_name like %XX% emp_name like %ZZ% [/background][/font][/color][/size]

[color=#282828][font=helvetica, arial, sans-serif][size=2][background=rgb(247, 247, 247)]illa [/background][/size][/font][/color]

Posted

[quote name='GatisKandis' timestamp='1381412000' post='1304387423']
select * from emp where emp_name like '%samyu% OR LIKE %tara%' OR LIKE %xxx%

this should work
[/quote]
kaani ...say for example. i want to pass the value as param ....i need to modify my SQL every time kada

Posted

chandra akka copy [img]http://lh3.ggpht.com/--o7mXz3u-j4/T9VVBGzBJAI/AAAAAAAAGo0/kmj8a1-XW2g/s150/PK-1.gif[/img]
[quote name='littlemoon' timestamp='1381412014' post='1304387427']
[size=4][color=#282828][font=helvetica, arial, sans-serif][background=rgb(247, 247, 247)]select * from emp where emp_name like %AA% OR emp_name like %XX% emp_name like %ZZ% [/background][/font][/color][/size]

[color=#282828][font=helvetica, arial, sans-serif][size=2][background=rgb(247, 247, 247)]illa [/background][/size][/font][/color]
[/quote]

×
×
  • Create New...