Friday, March 23, 2012

How to run query between two databases

Hi i have query which i need to join it
like i am doing some thing like
Select [a].[dbo].[tbla].* From [a].[dbo].[tbla] INNER INNER JOIN
[B].[dbo].[tblB ON [a].[dbo].[tbla].[ID] =
[b].[dbo].[tbla].[ID]
and i am running that query in database A but the only problem is it saying
that b.dbo.tblb.ID is invalid colum name i dont understand that i am giving
full address of both databases but cannt do it ..... any help thanksYour query seem to be syntactically wrong.
Anyways, correct it and try to add table alias for the tables and use them
to refer to the columns.
Or post the actual query that gave the error you mentioned.
--
"amjad" wrote:

> Hi i have query which i need to join it
> like i am doing some thing like
> Select [a].[dbo].[tbla].* From [a].[dbo].[tbla] INNER INNER JOIN
> [B].[dbo].[tblB ON [a].[dbo].[tbla].[ID] =
> [b].[dbo].[tbla].[ID]
> and i am running that query in database A but the only problem is it sayin
g
> that b.dbo.tblb.ID is invalid colum name i dont understand that i am givin
g
> full address of both databases but cannt do it ..... any help thanks|||could you post what your actually doing, rather than something like
what you're doing?
I mean what's an INNER INNER JOIN? is it something that's really
seriously inner on the join? and is it a typo or have you missed out a
"]" in your actual code?|||thanks for help i solved thanks
"Will" wrote:

> could you post what your actually doing, rather than something like
> what you're doing?
> I mean what's an INNER INNER JOIN? is it something that's really
> seriously inner on the join? and is it a typo or have you missed out a
> "]" in your actual code?
>

No comments:

Post a Comment