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
 2000 vs 2005

Author  Topic 

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-06 : 09:56:57
We have a table [fliegroups] that contains the location info for all of the DBs on all of the servers. The following query works fine on SQL2K5 but only returns the system DBs on 2K. If I comment out the WHERE clause it pulls up everything just fine...


select * from filegroups where [physical] like '%.MDF'
order by [server]

Is this incorrect for 2K or is something else wrong?

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

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

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-01-06 : 10:06:24
The structure of the 2 tables must be different
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-06 : 10:12:56
There is only one table that contains the data from both servers.

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

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

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2009-01-06 : 10:18:42
Then how are you running it on both 2000 and 2005?

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-06 : 11:13:27
It is sitting on SQL2K5 but it contains info for DBs in both versions of SQL...

I was able to figure it out. I used a different field that is available.

Thanks...

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

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

- Advertisement -