sql - Joining a query from a separate database -


i have 2 access 2007 databases, db1 , db2 convention, , trying outer join results of query (q1) in db1 query (q2) in db2.

my code looks this

select    q2.a,    q2.b,    q2.c,    q1.d    [full name of q1] in 'c:\users\...\db1.accdb' q1     right join       [full name of q2] q2     on q2.a = q1.a  ; 

but returns error "syntax error in clause."

i have tried method left join, trying far many brackets around things in fruitless attempts work. doing wrong?

that [source name] in 'file path' syntax tricky. if want alias [source name], need include alias between [source name] , 'file path' pieces (instead of after 'file path').

but works query includes single data source. once join anything, [source name] in 'file path' syntax breaks ... , not fixable. need different approach ...

select      q2.a,      q2.b,      q2.c,      q1.d     [c:\users\...\db1.accdb].[full name of q1] q1     right join [full name of q2] q2     on q2.a = q1.a; 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -