SQL Prompt does not autocomplete foreign key relationships in a SQL fragment if the tables are not typed with exactly the same case. SQL Prompt should be case-insensitive unless the database's collation is case-sensitive, which is unusual.
For example, with these tables,
create table A ( a_id int not null primary key)
create table B ( a_id int not null foreign key references a(a_id), b_id int not null )
typing this fragment,
select * from A join B on
pops up this option:
B.a_id = A.a_id
However, typing this fragment,
select * from a join b on
results in no popup at all, even after pressing Ctrl+space. Since my database uses a case-insensitive collation (SQL_Latin1_General_CP1_CI_AS), SQL Prompt should display the same popup as before.
A database's case-sensitivity can be determined with fn_helpcollations () and DatabasePropertyEx(@database,'Collation').
For example, with these tables,
typing this fragment, pops up this option:
However, typing this fragment, results in no popup at all, even after pressing Ctrl+space. Since my database uses a case-insensitive collation (SQL_Latin1_General_CP1_CI_AS), SQL Prompt should display the same popup as before.
A database's case-sensitivity can be determined with fn_helpcollations () and DatabasePropertyEx(@database,'Collation').