Go Back   CodingForums.com > :: Server side development > MySQL > Other Databases

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-18-2007, 06:20 AM   PM User | #1
Lis716
New to the CF scene

 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Lis716 is an unknown quantity at this point
Micorsoft SQL Server 2005

hi there!

I need help on how to create alphanumeric autonumber in SQL... like for example: HP1, HP2, HP3

is there other way aside from creating it in codes?

thanks!!!

Last edited by Lis716; 06-18-2007 at 06:28 AM..
Lis716 is offline   Reply With Quote
Old 06-19-2007, 06:37 PM   PM User | #2
javabits
New Coder

 
Join Date: May 2007
Location: SF, CA
Posts: 55
Thanks: 0
Thanked 4 Times in 4 Posts
javabits is on a distinguished road
Well you can either use concat with a string literal or two seperate columns.

so something like

select concat('HP', ID) from table

semper fi...
javabits is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:49 AM.


Advertisement
Log in to turn off these ads.