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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move one Record

Status
Not open for further replies.

Zen216

MIS
Jul 13, 2006
616
US
Hi all,
I have a situation, wehre our programmers made a change to our client application, and when things were updated, it deleted memo notes for that client.
We are running, SQL 2000 sp4 on Windows 2003
They were able to fix the problem, but 2 clients information got absolutely hosed..

I was able to restore the DB to a test machine from the precious night's backup..

Is there an easy way to migrate the info from 2 records, from the backup/test server, into the production DB?

Thanks everyone.
 
If you have a linked server, you can run an insert statement across servers. Two records shouldn't be a big deal. If not, you could export those records to a temporary permanent table in the production database, do your insert, then blow away the temp table.
 
Thanks RiverGuy,
I got the record exported to a temp table on the production server...
but I am cluless on how to get that data into one filed of one record...

ie. I am trying to get the contents of the memo field back into the record for customer 123456

 
data type is text

I tried to cut and paste,,, but that did not work..lol
If I look at the fielf from Enterprisemanager, all I see is <Large Text>
If I look at it from Server Management Studio, I see all fo the notes, but when I try to cut and paste it, all I get is the first line of notes....
(in this case there are about 10 entries of notes, but the cut and paste only picks up the first one)

Thanks Again
 
Well, I was able to update the field... took a bit. Thanks RiverGuy fro getting me pointed in the righ direction..
once the temp table was added,, I was able to run a very simple query to update it.. (Of course it looks simple now,,, but threre was some bloodshed to get it right..lol)

UPDATE CUSTOMER
SET CUSTOMER.MEMO = TESTMEMO.MEMO
FROM CUSTOMER, TESTMEMO
WHERE CUSTOMER.CUSTOMERNUMBER = '123456'


This works in both Enterprise Manager, and SQL Server Management Studio, although when I ran it on SSMS I got an error about FROM statement in SQL construct not supported,,, I hit ok, and it still ran and did what I needed it to...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top