[Squirrel-sql-users] Non Squirrel but what's wrong with my query
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: squirrel <squ...@ne...> - 2010-05-12 22:28:08
|
This select tt.tradeID from trades t inner join counterparty c on t.counterparty_code = c.counterparty_code right outer join #temp_tradeid t on tt.tradeID = t.tradeID or this select tt.tradeID from trades t inner join counterparty c on t.counterparty_code = c.counterparty_code right join #temp_tradeid t on tt.tradeID = t.tradeID fails. I only want to display the rows equal to the total rowcount of #temp_tradeid table. The Sybase Error code is 7364 and it is http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.sqlanywhere.11.0.1/saerrors_en11/errm139.html Error constant SQLE_CORRELATION_NAME_AMBIGUOUS ODBC 2 State 37000 ODBC 3 State 42000 Parameter 1 Ambiguous correlation name. Severity 16 SQLCODE –139 SQLSTATE 52012 Sybase error code 7364 Probable cause You identified two tables in the same FROM clause with the same correlation name. I am not sure if I am blind. But what's wrong with my double join? I know I can use =* but I would like to try this syntax. Any help would be greatly appreciated. Thanks! Neil |