Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Equivalent for the below piece of VB Code

User_FRTCMApr 29 2014 — edited Apr 29 2014

Hi,

Please help me in finding the PL SQL equivalent for below VB code :-

IIf(InStr(1, "1234567890", Mid(rSt1(1), 1, 1)) > 0, Mid(rSt1(1), 1, 7), Mid(rSt1(1), 1, 8)))

My Attempt:-

DECODE((INSTR(1, 1234567890, SUBSTR(SPSN_ECMCODE10_REC1.ECM_SC_OPTION, 1, 1)) > 0,

SUBSTR(SPSN_ECMCODE10_REC1.ECM_SC_OPTION, 1, 7),

SUBSTR(SPSN_ECMCODE10_REC1.ECM_SC_OPTION, 1, 8))

Thanks

Mrinal

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 27 2014
Added on Apr 29 2014
9 comments
358 views