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 assign vendor id

455054Feb 2 2010 — edited Feb 2 2010
Will it possible to write an easy function to assign a vendor id for new vendor.
What I would like to do is to see if there is a vendor id is being is used and if it not used then assign a vendor id for the new vendor . the first letter of the vendor name and four digit number. in the below exampe. As you can see there N0057 and N0058 is being used already and I would like to assign the vendor Id for NORTHWEST SEALING N0059. Can someone hlep me how to wirte a function to handle this. Thank you

VendorId VendorName
N0057 NUTT REDFIELD AND VALENTINE
N0058 NORTHERN GEO-COMPONENTS
NORTHWEST SEALING
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2010
Added on Feb 2 2010
3 comments
699 views