Hi,
I have a Auto Increment field in a table.
here i want to capture the auto incremented value, format it and insert into
another field/table.
for example: if my auto increment value is 10, i want to format it like
CHDOCREF_10 and insert to another
field.
please help me
-dnk"DNKMCA" <dnk@.msn.com> wrote in
news:uaCP$k2DGHA.1264@.TK2MSFTNGP09.phx.gbl:
> Hi,
> I have a Auto Increment field in a table.
> here i want to capture the auto incremented value, format it and
> insert into another field/table.
> for example: if my auto increment value is 10, i want to format it
> like CHDOCREF_10 and insert to another
> field.
Hava a look at scope_identity and @.@.identity:
http://msdn.microsoft.com/library/d...rl=/library/en-
us/tsqlref/ts_globals_50u1.asp
http://msdn.microsoft.com/library/d...rl=/library/en-
us/tsqlref/ts_sa-ses_6n8p.asp
Ole Kristian Bangs
MCT, MCDBA, MCDST, MCSE:Security, MCSE:Messaging|||You can create a trigger to add inserted data to other table.
Regards
Amish
No comments:
Post a Comment