[quoted text, click to view] "SQL" <denis.gobo@gmail.com> wrote in message
news:1130763777.977298.129160@g14g2000cwa.googlegroups.com...
> Yes this is possible
> create proc in DB1
> And the reference DB2 in you code like this
> (DBName.ObjectOwner.ObjectName)
> select * from DB2.dbo.table
>
> --------------------------------------------------------------------------
----------------
> "I sense many useless updates in you... Useless updates lead to
> fragmentation... Fragmentation leads to downtime...Downtime leads to
> suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG
> and DBCC DBREINDEX are the force...May the force be with you" --
>
http://sqlservercode.blogspot.com/ >
HI,
I tried the following SP but it returns an error when I call it from my vb6
app. The error is Invalid Object Name 'Sport.dbo.Document'
The database that the sp is based in is called GSP, the database that it's
trying to look at is called Sport.
CREATE PROCEDURE [dbo].[spGetDocument] AS
Select Distinct DocNum From Sport.dbo.Document Where Live = 1 And Date >=
'10/23/2005'
GO
Thanks for your help,
SW