Error in DatabaseLink when trying to select from multiple tables


I've noticed a rather inconvenient (assumed) bug when selecting data joined across multiple SQL tables.


conn = OpenSQLConnection["publisher"]

Selecting from a single table works fine:

SQLSelect[conn, "ROYSCHED"] // Short


However, when joining across multiple tables, I run into issues:

 SQLColumn[{"TITLES","TITLE_ID"}]==SQLColumn[{"ROYSCHED","TITLE_ID"}]]//Short[#, 15]&


It appears the private function invalidTableNameQ cannot handle lists. Also verified when you surround a single table name with brackets (ie {"ROYSCHED"}).

This seems like an obvious bug to me. I can fix it rather easy by navigating to $DatabaseLinkDirectory/Kernel/SCUD.m and manually add a DownValue for this function.


Any ideas or other verifications before I slap on the bugs tag?


Posted 2016-10-21T15:38:39.437

Reputation: 10 290

Does this happen if you write the join as plain SQL? – rm -rf – 2016-10-21T15:55:23.253

@R.M. Nope. If I write out the whole string and execute using SQLExecute it works fine. – kale – 2016-10-21T15:56:13.727

2@kale This issue is known and a fix is on the cards(either through paclet update or in next incremental version of Mathematica). – dsingh – 2016-10-21T18:50:56.480

No answers