Link to home
Start Free TrialLog in
Avatar of chalie001
chalie001

asked on

format accontno

how can i format account no

select acctno from employee

bb0201938

display like
bb-010-1938

oracle database
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i assume you mean "bb-020-1938", NOT "bb-010-1938"

bb0201938 >> bb-020-1938
Will the acctno always be in the same format (e.g. in your example 2 alpha characters followed by 7 digits)?
Avatar of chalie001
chalie001

ASKER

it can be both

12-001-1451
bb-020-7775
Did you try the substr in the first post?

If that didn't work, please explain why.
correct