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
 What am I doing wrong?

Author  Topic 

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-24 : 02:00:44
SET @dbdata = (select [physical]
from filegroups
where [Server] = @newserver
and [Database] = @newdbname
and [physical] like '%.mdf')

print @newserver
print @newdbname
print @dbdata


This is giving me a syntax error at the end (wherever I end it).

---------------------------

Working until "the morning sun sets the midnight sky on fire"!

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-24 : 02:02:09
Declarations are made earlier in the script. Everything ran fine until I added this piece of code.

---------------------------

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

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-12-24 : 03:33:06
Can you post the entire script?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-24 : 04:45:13
I didn't figure out the actual problem...I just backed out all the changes and started over. When I put that back in I'll repost if I still have teh problem.

Thanks

---------------------------

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

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-12-24 : 05:57:59
Surely it is in relation to the entire script.
If you don't wanna post the entire script...

good luck!

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2008-12-24 : 06:19:44
I had already blown away changes.

The entire script is very large.

---------------------------

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

- Advertisement -