Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 About auto increament value...

Author  Topic 

ppatil
Starting Member

9 Posts

Posted - 2006-07-28 : 00:33:58
Dear all,

There is one table "USERTABLE" in my Database ok..

As your project is "Online shopping portal.". when the first time user registers, he/she fillls all her info.. which goes in Usertable..

my probs is when he fills his Bank Account_No...the sequence must b in this oreder and every time it gets autogenerate..


In this sequence..
AAA10001 to AAA99999
AAB10001 to AAB99999
AAC10001 to AAC99999
: :
AAH10001 to AAH99999
AAZ10001 to AAZ99999
ABA10001 to ABA99999

Please give me Hint. because I am new in sql server.

Thanks In advance.

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-07-28 : 08:48:35
Homework ?
>> As your project is "Online shopping portal.". .....
Unfortunately v don't have such a project. And make sure when u copy & paste from ur homework, change the wording at least to not to have any doubt.

Any how, ur requirement is generating a sequence of characters and it doesn't have to much with SQL server.

Just a hint (for any program to generate these)
Consider the First 3 characters & Next 5 numbers seperately
U may need to use 2 loops.
Make use of ASCII values of Alphabetic characters.
Create the 2 parts and concatenate.


Srinika
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-07-28 : 12:02:32
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57069

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -