RBK Posted October 3, 2011 Report Posted October 3, 2011 [quote author=HS link=topic=245404.msg3072488#msg3072488 date=1317660615]baaaaaaaaaaaaaaaaaaa CITI_$D# CITI_$D# CITI_$D# CITI_$D# CITI_$D# you rock you rock you rock you rock you rock you rockgutta pagala pani chesindi kani nuvvu vendor name ki rasau @3$% @3$% @3$%aina sare CITI_$D# CITI_$D# CITI_$D# CITI_$D# CITI_$D# CITI_$D#[/quote] @gr33d @gr33d @gr33d @gr33d gali CITI_$D# CITI_$D# CITI_$D# CITI_$D# CITI_$D#
htnamus Posted October 3, 2011 Author Report Posted October 3, 2011 [quote author=RBK link=topic=245404.msg3072533#msg3072533 date=1317661005] @gr33d @gr33d @gr33d @gr33d gali CITI_$D# CITI_$D# CITI_$D# CITI_$D# CITI_$D#[/quote] you rock you rock you rock you rock *=: *=: *=:
gvkishore.kish Posted October 3, 2011 Report Posted October 3, 2011 [quote author=galigannarao link=topic=245404.msg3072505#msg3072505 date=1317660761]CharIndex will return the position of the chosen value. fo ex neeku name ila undi John ani CHARINDEX('n','John') will return 3 as output[/quote]Suppose "[ ]" middle lo vutne yelaa chestam Using substring....
spicyfish Posted October 5, 2011 Report Posted October 5, 2011 Dude , I think this may help you. try to run this: select substring('34.LXFU.401274..SB [AT&T]',0,charindex('[','34.LXFU.401274..SB [AT&T]',0)) this above query will check the "[" (starting position of the square bracket) and trims the value you want. You cans till remove the empty spaces by doing LTRIM or RTRIM to this query. I am if this is not wat you want. but clear ga cheppu i can try .
galigannarao Posted October 5, 2011 Report Posted October 5, 2011 [quote name='spicyfish' timestamp='1317783221' post='2939141'] Dude , I think this may help you. try to run this: select substring('34.LXFU.401274..SB [AT&T]',0,charindex('[','34.LXFU.401274..SB [AT&T]',0)) this above query will check the "[" (starting position of the square bracket) and trims the value you want. You cans till remove the empty spaces by doing LTRIM or RTRIM to this query. I am if this is not wat you want. but clear ga cheppu i can try . [/quote] he was helped baa. thanks for the query
spicyfish Posted October 5, 2011 Report Posted October 5, 2011 ANswer to Gopichand-no1: suppose id [] middle lo unte try this: select substring('34.LXFU.401274.[AT&T].SB ',0,charindex('[','34.LXFU.401274.[AT&T].SB ',0))+ substring('34.LXFU.401274.[AT&T].SB ',charindex(']','34.LXFU.401274.[AT&T].SB ',0),LEN('34.LXFU.401274.[AT&T].SB ')) this shld work.
spicyfish Posted October 5, 2011 Report Posted October 5, 2011 small change: select substring('34.LXFU.401274.[AT&T].SB ',0,charindex('[','34.LXFU.401274.[AT&T].SB ',0))+ substring('34.LXFU.401274.[AT&T].SB ',charindex(']','34.LXFU.401274.[AT&T].SB ',0)+1,LEN('34.LXFU.401274.[AT&T].SB '))
Recommended Posts