Hi all,
I wrote a stored procedure that pulls data from three tables. Two of the tables are in one database and a third table is in another (database is called coa and the table name in the database is COA). These databases are on the same server running SQL Server 7.0. When I run the stored procedure in vb.net I get the following error:
Invalid Object Name 'COA'.
Can anyone help me with this? What am I doing wrong in this stored procedure? Thanks,
jbehrne
If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations
I wrote a stored procedure that pulls data from three tables. Two of the tables are in one database and a third table is in another (database is called coa and the table name in the database is COA). These databases are on the same server running SQL Server 7.0. When I run the stored procedure in vb.net I get the following error:
Invalid Object Name 'COA'.
Can anyone help me with this? What am I doing wrong in this stored procedure? Thanks,
jbehrne
Code:
CREATE PROCEDURE ReturnPBCharges
AS
SELECT Total, Upcharge, AccountCode, JobName, Pieces, PRs.Internat, coa.dbo.COA.Description
FROM coa.dbo.COA, WeeklyData LEFT JOIN PostageRates ON WeeklyData.JobName = PostageRates.ClassCode
INNER JOIN COA ON WeeklyDataImport.AccountCode = COA.AccountNumber
If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations