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
 General SQL Server Forums
 New to SQL Server Programming
 Modify Data In Variable?

Author  Topic 

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-11-28 : 05:01:21
I have a query that returns a file path. The path is a relative path and I need to convert it to an absolute path:

current value returned:

\\d:\SQL Stuff\file.sql

I need it to look like:

\\SQLServer001\SQL Stuff\file.sql



"SQL Stuff" is a share.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-28 : 05:08:52
SET @a = REPLACE(@a, '\d:\', '\sqlserver001\')



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-11-28 : 05:26:59
Beautiful...looks like that is going to do it. I knew it had to be something really simple.

Thanks

Working until "the morning sun sets the midnight sky on fire"!
Go to Top of Page
   

- Advertisement -