473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL command needed to edit table data

I have an existing SQL 7 server named HHARBR. HHARBR has a database named
SPR with a table named "reportname" in it, the table has the name HHARBR
embedded the table data.

I migrated the HHARBR database SPR to a second server called HHARBR2. When I
look into the table in HHARBR2 I still see the name HHARBR in the data.

What command can I run on HHARBR2 to change the table entries of HHARBR to
the new server name of HHARBR2?

I prefer something I can run in the Query Analyzer

Source server: HHARBR
Source Database: SPR
Source Datbase Table: reportname

Destination Server: HHARBR2
Destination Databse: SPR
Destination Table: reportname

Summary:
Change wrong server name in destination server to reflect the destinations
server name
Feb 23 '06 #1
2 2430
You didn't give us the column with the reportname table. It'll go something
like:

update reportname
set
MyCol = 'HHARBR2'
where
MyCol = 'HHARBR'

--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"News East" <Me******@yahoo.com> wrote in message
news:cX7Lf.171257$WH.96105@dukeread01...
I have an existing SQL 7 server named HHARBR. HHARBR has a database named
SPR with a table named "reportname" in it, the table has the name HHARBR
embedded the table data.

I migrated the HHARBR database SPR to a second server called HHARBR2. When I
look into the table in HHARBR2 I still see the name HHARBR in the data.

What command can I run on HHARBR2 to change the table entries of HHARBR to
the new server name of HHARBR2?

I prefer something I can run in the Query Analyzer

Source server: HHARBR
Source Database: SPR
Source Datbase Table: reportname

Destination Server: HHARBR2
Destination Databse: SPR
Destination Table: reportname

Summary:
Change wrong server name in destination server to reflect the destinations
server name
Feb 23 '06 #2
News East (Me******@yahoo.com) writes:
I have an existing SQL 7 server named HHARBR. HHARBR has a database named
SPR with a table named "reportname" in it, the table has the name HHARBR
embedded the table data.

I migrated the HHARBR database SPR to a second server called HHARBR2. When I look into the table in HHARBR2 I still see the name HHARBR in the data.

What command can I run on HHARBR2 to change the table entries of HHARBR to
the new server name of HHARBR2?

I prefer something I can run in the Query Analyzer

Source server: HHARBR
Source Database: SPR
Source Datbase Table: reportname

Destination Server: HHARBR2
Destination Databse: SPR
Destination Table: reportname

Summary:
Change wrong server name in destination server to reflect the destinations
server name


Rather than having the servername in a table, you could @@servername.
As a compromise you could change the column to a computed column:

col AS @@servername
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Feb 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Keith Morris | last post by:
Hi all! I'm creating a mini CMS that will store content in a MySQL database. What I am trying to do is parse the content and replace certain keywords with a link. The keywords and associated...
0
by: Steve Bishop | last post by:
I have a form with a search text box and a grid that displays the results. Within the grid, I have edit command links set up to response.redirect to another page that puts the DataKey value in the...
0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
1
by: John Thompson | last post by:
We're sooo close. When we load the page to upload the image, all of the prms go through except the binary image data. Using SQL server with the data type set to "image". Please help! Thanks-...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
1
by: Kosmös Pollard | last post by:
Hey guys, I'm rather new to access and can not seem to figure out what is wrong with this code I will post below...but first...it was working perfectly fine before I added this: recSet2.Edit...
1
by: Selvakumar | last post by:
hai friends, I am new to .net programming. I did the inserting data into MS-access database but i couldn't able to perform the update command. I used only textbox and command button for inserting...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
1
by: a | last post by:
Dear Frends I have this code but I don't know the SQL Code to copy data from CSV file to new table in the current access data base What is SQl Command needed??? Imports System.Data.OleDb ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.