Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 This is probably very easy for most of you

Author  Topic 

biggunsar
Starting Member

3 Posts

Posted - 2014-09-29 : 08:14:23
But I am looking at modifying an entire vertical row, but where i am stuck is.

the row looks like this \\svrju01\pcss\images\Case 00004.2009\P1A8.doc

And i want to only edit the first part\\cjd-jems01\not change anything after this slash keeping that data intact in the row. Moving my pdf data from one server to another. But the software we are using, I must edit the SQL data or the clients cannot access the new data in the new server.

So my new vertical row will show \\cjd-jems01\same unc path as before
and \\cjd-jems01\same unc path as before
ect


Any SQL wizz wanna try this, cause I am stuck.

THank you for any responses.

biggunsar
Starting Member

3 Posts

Posted - 2014-09-29 : 08:16:09
Oh ya, the vertical sql row is called ImgPath

Sorry. Left that out.

Andrew doussept
Go to Top of Page

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-09-29 : 09:58:12
REPLACE function
Go to Top of Page

biggunsar
Starting Member

3 Posts

Posted - 2014-09-29 : 14:59:27
quote:
Originally posted by gbritton

REPLACE function



Okay, I am a SQL newbie. Thank you for the help, of mentioning the replace function.

But uhhhh. What would be the script to use taht replace function to replace all the entries to \ \cjd-jems\keep rest of data intact after this part.

Andrew doussept
Go to Top of Page

sunder.bugatha
Yak Posting Veteran

66 Posts

Posted - 2014-09-30 : 08:56:29
UPDATE <TABLE NAME>
SET <COLUMN NAME> = REPLACE (<COLUMN NAME>,'svrju01','cjd-jems01')

Hema Sunder
Go to Top of Page
   

- Advertisement -