No join suggestions
MikeyC
Posts: 249 Bronze 3
I have the option turned on in SQL Prompt 3.6 EA to suggest joins based on field names, but when writing this query:
SELECT
tdl_id
FROM edic_cga_details d
INNER JOIN (SELECT tx_id, SUM(amount) as amt FROM edic_cga_details WHERE detail_type=42 GROUP BY tx_id) a
ON <cursor>
WHERE
DETAIL_TYPE=10;
When I type a space at <cursor> it brings up a list of table aliases and field names, but no join conditions. The only possible join is on TX_ID since it exists in both sources. (AMT doesn't exist in the source table edic_cga_details.)
SELECT
tdl_id
FROM edic_cga_details d
INNER JOIN (SELECT tx_id, SUM(amount) as amt FROM edic_cga_details WHERE detail_type=42 GROUP BY tx_id) a
ON <cursor>
WHERE
DETAIL_TYPE=10;
When I type a space at <cursor> it brings up a list of table aliases and field names, but no join conditions. The only possible join is on TX_ID since it exists in both sources. (AMT doesn't exist in the source table edic_cga_details.)
Comments
Thanks,
Bart
Principal Consultant
bartread.com Ltd
Michael