Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generate Identity Date-wise
Message
 
To
13/03/2008 07:25:03
Aman Bains
Jaguar Computers
Jalandhar, India
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01301677
Message ID:
01301699
Views:
10
>Is it possible to generate conditional identity or on the basis of another field(s)?
>I need to populate a char(5) field with date wise numbering i.e. numbering begins from 1 for each new date. I have another identity field for uniqueness, but i need to populate this one for backward compatibility, as i was using composite unique keys earlier.


Aman,

I suggest you use "INSTEAD OF INSERT" trigger for that.

http://msdn2.microsoft.com/en-us/library/ms175089.aspx

Cheers,

Zoran
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform