|
Posted by David Portas on 12/13/06 23:46
JF Fortier wrote:
> Hi group
>
> I'm not familiar with the name, newbies user.
>
> The SQL key is call Row # ?? if that correct can it be possible to create a
> new record and replace that unique ID key to a previous erase value ??
>
> Some one did a terrible mistach by erasing data without knowing the full
> consequence of her act, now I lost all reference from 6 years of reports job
> cost because of that, so when creating the new key and replacing the Row#
> with the original, all link to that will be restore.
>
> Thank you
>
> JF Fortier
If you've lost some data then first see if you can restore it from a
backup. Assuming you want to recover some data selectively then you can
restore to a new database and extract the data you want.
Maybe you just need to know how to insert an IDENTITY column value. In
that case, use the SET IDENTITY_INSERT option:
SET IDENTITY_INSERT tbl ON;
INSERT INTO tbl (id, col1, col2) VALUES (1234, 'foo','bar');
SET IDENTITY_INSERT tbl OFF;
Hope this helps.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Navigation:
[Reply to this message]
|