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?

  • $\begingroup$ Does this happen if you write the join as plain SQL? $\endgroup$ – rm -rf Oct 21 '16 at 15:55
  • $\begingroup$ @R.M. Nope. If I write out the whole string and execute using SQLExecute it works fine. $\endgroup$ – kale Oct 21 '16 at 15:56
  • 2
    $\begingroup$ @kale This issue is known and a fix is on the cards(either through paclet update or in next incremental version of Mathematica). $\endgroup$ – dsingh Oct 21 '16 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.