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
 SQL Server Development (2000)
 Creating a Sequential Record Number field in Sql server While Inserting

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-18 : 06:11:24
Shailesh writes "I want to create Sequential Record Number field in Sql server Table While Inserting record without using Identity .

The records are inserted through an Multiuser Application
(web or Client Server ) The records may or may not be a Transaction

regards


Shail363"

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-03-18 : 07:12:33
If you don't want to use the tools given to you by microsoft, you will have to write your own.

(oh, are you asking us to write something for you?)

Jay White
{0}
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-03-18 : 07:52:42
To quote Chadmat, who has had me laughing for days with this :

quote:

I want to invent a circular transportation facilitation device, but I don't want to use a wheel.




Damian
Go to Top of Page

vganesh76
Yak Posting Veteran

64 Posts

Posted - 2003-03-18 : 08:21:41
quote:

Shailesh writes "I want to create Sequential Record Number field in Sql server Table While Inserting record without using Identity .

The records are inserted through an Multiuser Application
(web or Client Server ) The records may or may not be a Transaction

Probably u can try this query.

Insert into table1 (Srlno,Name,CrDate)

select
(select count(*) from Table1 a where a.Srlno < b.Srlno) as Srlno,
'Cust Name' as Name,
getdate() as CrDate
From
Table1 b

regards
V.Ganesh
vganesh@netassetmgmt.com
(vganesh76@rediffmail.com)



Shail363"



Enjoy working
Go to Top of Page
   

- Advertisement -