0

I want to retrieve "name" from "My_name_is_ABC", how to do it in Sybase-ASE ?

I tried finding on internet but inbuild functions i saw are not supported in ase.

Atleast i need to know how to do find index of a string.

user3233451
  • 119
  • 2
  • 6
  • 17

2 Answers2

0

Sybase ASE does have inbuilt string functions as Documented Here. You can use SUBSTRING and CHARINDEX function to get your desired result like below

select substring("My_name_is_ABC",charindex("_", "My_name_is_ABC")+1,4)

Syntax for Substring function : substring(expression, start, length )

Rahul
  • 76,197
  • 13
  • 71
  • 125
0
select substr('My_name_is_ABC',locate('My_name_is_ABC','name'),4) from dummy
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
Akki
  • 1