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!

How to select first 6 and last 4

unknown-1052419Feb 24 2014 — edited Feb 26 2014

Hi All,

11.2.0.1

Hi all,

I have a table with column CARDNO which contains variable digits credit card numbers ranging from 16 to 20 digits.

I want to display the first 6 and last 4 digits only.

For the first 6, I can do> substr(cardno,1,6)

Can you help me with the last 4 please....

Thanks,

pK

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2014
Added on Feb 24 2014
44 comments
11,979 views