Ability to configure JOIN suggerstions for tables with no relations
Automatically propose join tables when JOIN instruction is typed.
Proposal should not be baseed on existing tables relationships since most ERP out there do not have such relationships within the database.
What I would like is that the user can configure all joins he knows for each tables and when the user types a SELECT instruction with JOIN that SQL Complete propose the list of all preconfigured joins for the tables already part of the SELECT.
Ex:
SELECT fields
FROM Table1
INNER JOIN Table2 ON Table1Key=Table2.Key
INNER JOIN <here SQL Complete> would propose all preconfigured joins for Table1 AND Table2
-
Geoff commented
I know this is an old item, but I've been struggling with this a lot, and would find something similar very very useful.
Often there are joining fields which are not foreign keys, and have different names. If previous join conditions were remembered and suggested next time, that would help a lot.
E.g.
select * from part p join inventory i on p.part_id = i.item_idIf we built the join condition by selecting each field from the dropdowns, is it possible to cache the entire join next time, so that when we join those two tables it includes part_id = item_id in the list of suggestions?
-
JensOd commented
option for user defined join completion
In some applications the relation between tables are only present in code (not available to be analyzed by SQL Complete)
it would be nice if SQL Complete could be made aware of these somehow.Example of conditional relation (from SAP)
SELECT * FROM OINV JOIN JDT1.TransType == '13' AND JDT1.Ref1 = OINV.DocEntry
This relation also holds between INV1 and JDT1
but not between ODLN and JDT1 for which TransType is required to be '15'.
Also OINV.DocEntry and ODLN.DocEntry is completely unrelated and it makes no sense to join on those.The option should be able to handle name conventions e.g. by using regex: /O(\w\w\w)/ join /{$1}(\d+)/ on /{$1}{$2}/.DocEntry == /O{$1}/.DocEntry