0

data: "500020,rcord.dat,CIND,A1WSQ,NID,N1265,NID,PP23"

I want extract the data between the two NID. And also to extract the data after 5 th comma(,)

I want only the sql SELECT query not procedure or function

thanks for you help...

user4404054
  • 1
  • 1
  • 2
  • 1
    possible duplicate of [How do I split a string so I can access item x](http://stackoverflow.com/questions/2647/how-do-i-split-a-string-so-i-can-access-item-x) – APH Jul 30 '15 at 16:56
  • Even though the duplicate question is for SQL Server, it's likely the same or very close in Sybase ASE. Also, it's helpful to know what you have already tried, and the actual software/version you are running, as Sybase was a company that produced a number of different database products. – Mike Gardner Jul 30 '15 at 18:29
  • I have tried the below quert, – user4404054 Jul 30 '15 at 19:28
  • select substr(substr(col1,instr(col1,',',1,5)+1),1,instr(substr(col1,instr(col1,',',1,5)+1),',')-1) from tab1; – user4404054 Jul 30 '15 at 19:29
  • sybase version: sybase ase 11.9.2 – user4404054 Jul 30 '15 at 19:35
  • please help me on this issue – user4404054 Jul 30 '15 at 19:52

0 Answers0