November 23, 2004 at 4:00 pm
Hi expert,
I want to select from different databases (HFC and HFC_EPAY) but it gives me an error: Invalid object name 'HFC_Epay.dbo.Epay_Traction_Table'
where does it go wrong? here is my code:
Thank you.
----------------------------------------------------------
SELECT T.EmployID, T.Batch_Num, U.LASTNAME, U.FRSTNAME
FROM HFC_Epay.dbo.EPay_Transaction_Table T INNER JOIN
HFC.dbo.UPR00100 U ON T.EmployID = U.EMPLOYID
WHERE (T.Batch_Num =
(SELECT MAX(batch_num)
FROM HFC_Epay.dbo.Epay_Traction_Table))
November 23, 2004 at 6:37 pm
try this...
SELECT T.EmployID, T.Batch_Num, U.LASTNAME, U.FRSTNAME
FROM HFC_Epay.dbo.EPay_Transaction_Table T INNER JOIN
HFC.dbo.UPR00100 U ON T.EmployID = U.EMPLOYID
WHERE (T.Batch_Num =
(SELECT MAX(HFC_Epay.dbo.Epay_Traction_Table.batch_num)
FROM HFC_Epay.dbo.Epay_Traction_Table))
November 24, 2004 at 12:43 am
Could it be that you meant to spell Traction as Transaction in the final FROM clause ?
November 24, 2004 at 3:00 am
No Its Transaction i believe...... Just one changes ... MAX(HFC_Epay.dbo.Epay_Traction_Table.batch_num) instead of MAX(batch_num)
November 24, 2004 at 8:01 am
Are you sure dbo is the owner of the table.
I would open enterprise manager and confirm dbo owns the tables. I have worked on some systems that they gave the tables owners other than dbo.
Let us know.
Tom
November 24, 2004 at 1:02 pm
if not sure of who the owner is just use
MAX(HFC_Epay..Epay_Traction_Table.batch_num) instead of MAX(batch_num).
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply