Friday, March 9, 2012

Msg 107, Level 16, State 2, Line 1

Hi,
I am getting the following error from the query below against SQL
Server 8.00.2039 (SP4)
Error:
====
Server: Msg 107, Level 16, State 2, Line 1
The column prefix 'd' does not match with a table name or alias name
used in the query.
Select Statement:
=============
select ...
from trades a,
gems_product_groups b,
portfolio_nav_mapping c,
products d,
limit_types e
left outer join gems_prod_trade_mod f on d.product_id =
f.product_ID
I know this was a known bug in MS-SQL7, but I thought it had been fixed
in 2000.
Can anyone help?
ThanksBill
It worked on my workstation (SQL Server 2000 SP3)
BTW why would you want to use an 'old' style and not OUTER JOIN?
"bill1947" <billdonovan1947@.yahoo.com.au> wrote in message
news:1138768112.996524.20860@.g14g2000cwa.googlegroups.com...
> Hi,
> I am getting the following error from the query below against SQL
> Server 8.00.2039 (SP4)
> Error:
> ====
> Server: Msg 107, Level 16, State 2, Line 1
> The column prefix 'd' does not match with a table name or alias name
> used in the query.
> Select Statement:
> =============
> select ...
> from trades a,
> gems_product_groups b,
> portfolio_nav_mapping c,
> products d,
> limit_types e
> left outer join gems_prod_trade_mod f on d.product_id =
> f.product_ID
> I know this was a known bug in MS-SQL7, but I thought it had been fixed
> in 2000.
> Can anyone help?
> Thanks
>|||Uri,
I changed the order of the tables to
gems_product_groups b,
portfolio_nav_mapping c,
limit_types e,
products d
left outer join gems_prod_trade_mod f on d.product_id =
f.product_ID
and it works. In the previous incarnation I tried every type of join
and got the same error.

No comments:

Post a Comment