No Join Expression
MikeyC
Posts: 249 Bronze 3
I'm using the 3.6 release of SQL Prompt and in some cases I'm not getting a join suggestion when I think I should be.
Here is an example:
select distinct tx_id
into [TX_IDs WITH Problems 9-24-07]
from edic_charges where balance<0
<refresh cache to pickup new table>
SELECT *
FROM edic_charges c
LEFT JOIN [TX_IDs WITH Problems 9-24-07] t
on <cursor>
At that point it starts suggesting table aliases and field names, but no join suggestions even though both of them have TX_ID as a field. Maybe it has to do with the one table only having one field or something?
Also, if I manually type the join, so I type "c." and pick TX_ID, and then type "= t." it suggests TX_ID, but if I type another t, so it is now "t.t", it suddenly has no suggestions. (Same happens in the WHERE clause.)
Here is an example:
select distinct tx_id
into [TX_IDs WITH Problems 9-24-07]
from edic_charges where balance<0
<refresh cache to pickup new table>
SELECT *
FROM edic_charges c
LEFT JOIN [TX_IDs WITH Problems 9-24-07] t
on <cursor>
At that point it starts suggesting table aliases and field names, but no join suggestions even though both of them have TX_ID as a field. Maybe it has to do with the one table only having one field or something?
Also, if I manually type the join, so I type "c." and pick TX_ID, and then type "= t." it suggests TX_ID, but if I type another t, so it is now "t.t", it suddenly has no suggestions. (Same happens in the WHERE clause.)
Comments
You should be able to include join candidates based on column name by enabling the option: Options > Listed Candidates > Join Conditions > Column Names.
Also, by default SQL Prompt has case sensitive filtering of objects enabled. This is why t.t didn't suggest t.T*. You can change this option in:
Options > Listed Candidates > Candidate Types and Filters > Enable case-sensitive filtering of candidates.
I hope this does what you need.