Mayank Khurrana
Mayank Khurrana

Reputation: 15

How to locate a index in a column value

How to locate a index in a column value

For example:

Database : Oracle

INSTR('-',AEND_NATIVE_EMS_NAME)

I need to find the index of first occurrence of - in column AEND_NATIVE_EMS_NAME

For MySql DB I was using

LOCATE('-', l.AEND_NATIVE_EMS_NAME)

which is working fine for me.

Please help me out with oracle

Upvotes: 0

Views: 40

Answers (1)

massko
massko

Reputation: 589

Put the parameters inversely

INSTR(AEND_NATIVE_EMS_NAME, '-')

Upvotes: 1

Related Questions