hi guys,
I'm having problems with translating a sybase SQL with a slightly complicated outer join binding into SQL server form. can someone tell me where I can find adedquate help to solve this problem.Or maybe directly help with this SQL?!.
The SQL , simplified, is looking like this:
select a,b,c,d,e,f
FROM
DBA.ZNNADF,
DBA.ZNNUDF left outer join DBA.ZNAQDF on (NUADCD = AQADCD),
DBA.ZNNUDF left outer join DBA.ZNN8DF on (NUNACD = N8NACD AND NUNUCD = N8NUCD),
DBA.ZNAQDF left outer join DBA.ZNADDF on (AQADCD = ADADCD),
DBA.ZNNCDF,
DBA.ZNNUDF left outer join DBA.ZIIHDF on (NUCOCD = IACOCD AND NULECD = IALECD AND NUACID = IAACID AND NUSBCD = IASBCD),
DBA.ZIIHDF left outer join DBA.ZABLDF on (IHMPNB = BLMPNB),
DBA.ZNAQDF left outer join DBA.BO_REFTEXT on (AQA1CD = CODE AND GID='Country')
the error message I get reads:
'Tables or functions 'DBA.ZNNUDF' and 'DBA.ZNNUDF'have the same exposed names.Use correlation names to distinguish them
.I know SQL-Server doesn't like the use of the same tables saveal times after the 'FROM' syntax..but how do I solve it exactly??
I thank you in advance for any help offered.
Cheers,
kingsley
I'm having problems with translating a sybase SQL with a slightly complicated outer join binding into SQL server form. can someone tell me where I can find adedquate help to solve this problem.Or maybe directly help with this SQL?!.
The SQL , simplified, is looking like this:
select a,b,c,d,e,f
FROM
DBA.ZNNADF,
DBA.ZNNUDF left outer join DBA.ZNAQDF on (NUADCD = AQADCD),
DBA.ZNNUDF left outer join DBA.ZNN8DF on (NUNACD = N8NACD AND NUNUCD = N8NUCD),
DBA.ZNAQDF left outer join DBA.ZNADDF on (AQADCD = ADADCD),
DBA.ZNNCDF,
DBA.ZNNUDF left outer join DBA.ZIIHDF on (NUCOCD = IACOCD AND NULECD = IALECD AND NUACID = IAACID AND NUSBCD = IASBCD),
DBA.ZIIHDF left outer join DBA.ZABLDF on (IHMPNB = BLMPNB),
DBA.ZNAQDF left outer join DBA.BO_REFTEXT on (AQA1CD = CODE AND GID='Country')
the error message I get reads:
'Tables or functions 'DBA.ZNNUDF' and 'DBA.ZNNUDF'have the same exposed names.Use correlation names to distinguish them
.I know SQL-Server doesn't like the use of the same tables saveal times after the 'FROM' syntax..but how do I solve it exactly??
I thank you in advance for any help offered.
Cheers,
kingsley