HI
i have requirement can any one resolve it
there are there strings "sample","pa","vx"
now check 2ndstr 1st character with 1st string if character present then replace the first string with thrid string (second string char index of first character)
ex: take 2nd str first char "P"
Check with 1st string if there replace the 1st string with "P" char index OF thrid string. i.e 2ndstr(0)=3rdstr(0);
now samvle
repeat the same step
string must be "sxmvle"
one more example to get understand "as400",'0la","ssv"
step1: result as4ss
step2: result as4ss
Step3:result vs4ss
Note: we should not use variables,looping,table,arrays etc it must be in single set based query.
Thanks
i have requirement can any one resolve it
there are there strings "sample","pa","vx"
now check 2ndstr 1st character with 1st string if character present then replace the first string with thrid string (second string char index of first character)
ex: take 2nd str first char "P"
Check with 1st string if there replace the 1st string with "P" char index OF thrid string. i.e 2ndstr(0)=3rdstr(0);
now samvle
repeat the same step
string must be "sxmvle"
one more example to get understand "as400",'0la","ssv"
step1: result as4ss
step2: result as4ss
Step3:result vs4ss
Note: we should not use variables,looping,table,arrays etc it must be in single set based query.
Thanks
Comment