Reply to Re: SQL can it be done ?

Your name:

Reply:


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
--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация