Jump to content

Sql Query Help


Recommended Posts

Posted

Naaku oka email body column ga undhi...
andhulo 5 by 5 codes untay.. naku avi matram kavali bayataki..
5 by 5 code looks like..
SDFSS-32RDS-SFDF3-DSFW3-DSF32

Sample Data

Col1 Col2 Col3
SDFSS-32RDS-SFDF3-DSFW3-DSF22 sdfeefgfeew SfdSS-3sdDS-SFDF3-3SgW3-DSsd2 32 34


output
SDFSS-32RDS-SFDF3-DSFW3-DSF22 32 34

SfdSS-3sdDS-SFDF3-3SgW3-DSsd2 32 34

  • Replies 33
  • Created
  • Last Reply

Top Posters In This Topic

  • loveindia

    8

  • kranthi111

    7

  • vikuba

    5

  • deals2buy

    5

Posted

substring vaadi atinchochu...

Posted

only 2 mathramey untaya. leka ekkuva undocha?

Posted

[quote name='Aamphat' timestamp='1359160612' post='1303178602']
substring vaadi atinchochu...
[/quote]


oka daniki ithe vadochu i got the code


substring(Body, (PATINDEX('%[A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][-][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][-][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][-][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][-][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9][A-Z0-9]%', Body)),29)

kaani multiple ela cheyalo ravatla, functions rayali but adhe ravatla...

Posted

SELECT SUBSTRING(col1, 1, 29) , col2,col3 from table T

SELECT SUBSTRING(col1, 43, 29) , col2,col3 from table T

Posted

[quote name='Vaampire' timestamp='1359160727' post='1303178618']
only 2 mathramey untaya. leka ekkuva undocha?
[/quote]


ekkuva untay... no idea enni untayo

Posted

i guess my way of interpreting the question is wrong

Posted

[quote name='Aamphat' timestamp='1359160806' post='1303178633']
SELECT SUBSTRING(col1, 1, 29) , col2,col3 from table T

SELECT SUBSTRING(col1, 43, 29) , col2,col3 from table T
[/quote]



avi ekkada untayo manaki telidhu. its an email body so ekkadyna undochu..

Posted

[quote name='kranthi111' timestamp='1359160872' post='1303178645']



avi ekkada untayo manaki telidhu. its an email body so ekkadyna undochu..
[/quote]
got it...so oka search function raayali anamaata

Posted

[quote name='kranthi111' timestamp='1359160872' post='1303178645']



avi ekkada untayo manaki telidhu. its an email body so ekkadyna undochu..
[/quote]
throwing ideas...

script query such tht when ever it counters this part stop and retrieve next 29 characters and corresponding col1 and col2 values.
anni first 5 letter SDSRs tho start aitey maatram like ani ooo in ani oo vaadi try cheyochu..
different different untaaya? every time we call to search

Posted

[color=#282828][font=helvetica, arial, sans-serif]SDFSS-32RDS-SFDF3-DSFW3-DSF32 [/font][/color]

ivanni gu!d's so daniki emanna function or keywords untayo choodu sq! lo...lekapote aa guids anni same length ayite including -'s then replace them with "" ( i mean remove dashes) then get the string by its length (account for space too)

ATB S%Hi H&*()

Posted

[quote name='pikki' timestamp='1359161263' post='1303178703']
[color=#282828][font=helvetica, arial, sans-serif]SDFSS-32RDS-SFDF3-DSFW3-DSF32 [/font][/color]

ivanni gu!d's so daniki emanna function or keywords untayo choodu sq! lo...lekapote aa guids anni same length ayite including -'s then replace them with "" ( i mean remove dashes) then get the string by its length (account for space too)

ATB S%Hi H&*()
[/quote]

adhi guids kaadhu X-B-O-X codes.. first time vachevi kanukunna second time vachevi em cheyalo ardham avatledhu..

Posted

[quote name='kranthi111' timestamp='1359160512' post='1303178586']
Naaku oka email body column ga undhi...
andhulo 5 by 5 codes untay.. naku avi matram kavali bayataki..
5 by 5 code looks like..
SDFSS-32RDS-SFDF3-DSFW3-DSF32

Sample Data

Col1 Col2 Col3
SDFSS-32RDS-SFDF3-DSFW3-DSF22 sdfeefgfeew SfdSS-3sdDS-SFDF3-3SgW3-DSsd2 32 34


output
SDFSS-32RDS-SFDF3-DSFW3-DSF22 32 34

SfdSS-3sdDS-SFDF3-3SgW3-DSsd2 32 34
[/quote]

xbox antunnav antey idi ye company data noo ardam aindi... okkati cheppu.. how many records meeda ee query run avvali.. or oka particular code meeda run ayitey chaala???

I mean oka proc / function ki input laaga idi istaavaaa??

Posted

[quote name='loveindia' timestamp='1359181301' post='1303180388']

xbox antunnav antey idi ye company data noo ardam aindi... okkati cheppu.. how many records meeda ee query run avvali.. or oka particular code meeda run ayitey chaala???

I mean oka proc / function ki input laaga idi istaavaaa??
[/quote]


adhi raw table oka store proc rasthe output ila ravali...

Posted

[quote name='kranthi111' timestamp='1359181779' post='1303180420']


adhi raw table oka store proc rasthe output ila ravali...
[/quote]

query raayadam ardam ayyindi baa.. oka chinna question enti antey, nuvvu cursor vaadi savocchaa???


I am asking because,

okka row aitey query lo cheyocchu... but anni records in a table antey you have to use cursor ani naa feeling.. One time use antey, just use that it will be fine... I can give the query..

×
×
  • Create New...