0

I am working in Sybase environment and trying to figure out how to find the records that have particular letter in a word from a column

example i have a column name plan name it has records like 'MYMR001','SYMR0101',NYMR1111' ETC.. i need to locate the 'R' in the 4th digit of the plan name column and fetch those records. i am new to Sybase trying to get the correct syntax , can any one here help me out!!!

i tried the below syntax: select TOP 1 sub string('plan name',char index("R", "NYMR0000")+1,4) FROM table

gowtami
  • 13
  • 4

1 Answers1

0

To *find* something you need to place a test in the where clause, eg:

select *
from   <table>
where  substring([plan name],4,1) = 'R'
markp-fuso
  • 28,790
  • 4
  • 16
  • 36