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 2000 Forums
 SQL Server Development (2000)
 Error Will Robinson

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2003-07-14 : 20:59:55
Perfectly fine diagnostic query. The inner query works dandy,

select *
from
(


select U.firstname, U.lastname

FROM Users U
inner join centers c on u.centerid=c.centerid
left outer join dscrnames D ON dbo.LFM_First(D.Fullname) =U.Firstname and DBO.LFM_LAST(D.FULLNAME) = U.lastname

where Centername = 'dscr' and U.Inactive = 1 and D.org is not null
group by U.firstname, U.lastname having count(*)>1

) X


but lump em' together and

Server: Msg 913, Level 16, State 8, Line 1
Could not find database ID 101. Database may not be activated yet or may be in transition.




Edited by - SamC on 07/14/2003 21:03:20

nr
SQLTeam MVY

12543 Posts

Posted - 2003-07-15 : 00:41:40
It's a known "feature" when you use a udf to create a derived table.

If you search for the error you will find the knowledge base entry.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-07-15 : 10:09:11
God...I love Microsoft....



Brett

8-)
Go to Top of Page
   

- Advertisement -