Home » SQL & PL/SQL » SQL & PL/SQL » Auto ID + letter
Auto ID + letter [message #287812] Thu, 13 December 2007 11:04 Go to next message
Bashair
Messages: 10
Registered: November 2007
Junior Member
Hello,

Does anyone know how to generate an auto ID that contains a letter plus a number?

Thank you!
Re: Auto ID + letter [message #287813 is a reply to message #287812] Thu, 13 December 2007 11:10 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
There is no automated way to do it with an Oracle Sequence.

The alternatives depend on your need.

One way is to store the prefix letter in a table, generate your sequence and keep both in the table.

You can prepend the prefix to the sequence and store the entire value in your table.

If you want it for display purposes only, then you can simply add it to the beginning when fetching the data from the database.

Re: Auto ID + letter [message #287817 is a reply to message #287813] Thu, 13 December 2007 11:42 Go to previous message
Bashair
Messages: 10
Registered: November 2007
Junior Member
Thank you!
Previous Topic: Error in executing procedure
Next Topic: about multiple values passing in single parameter
Goto Forum:
  


Current Time: Sat Dec 03 18:29:07 CST 2016

Total time taken to generate the page: 0.22503 seconds