Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identity function

Status
Not open for further replies.

week

MIS
Feb 14, 2001
118
US
I am not aware of anything like this but anyone knows any existing function that will create identity column with yyyymm at the end as part of the ID?

Thanks.
 
This can be done using an insert trigger.

Create Trigger triggername on YourTable
For Insert
As

update YourTable
set YourColumn = YourIdentityColumn + cast(getdate() as string)

Something like that.
 
Sounds like a good idea!! Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top