Simple joins work via command line, but not in GUI

Forum for DBF Commander discussing.

Simple joins work via command line, but not in GUI

Postby somethingsimil » Mon Apr 08, 2019 12:31 am

The following SQL works in the command line, but not in the GUI.

select *
from "C:\Users\administrator\Desktop\scratch\POLICY.DBF" p, "C:\Users\administrator\Desktop\scratch\TRANSACT.DBF" t
where p.pol_idx = t.pol_idx

This must have broken at some point, because I originally composed and tested these queries in the GUI.

Always gives an error message of: -> Invalid path or file name
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm

Re: Simple joins work via command line, but not in GUI

Postby Admin » Mon Apr 08, 2019 10:00 am

Please use the following syntax:
Code: Select all
select *
from "C:\Users\administrator\Desktop\scratch\POLICY.DBF" AS p, "C:\Users\administrator\Desktop\scratch\TRANSACT.DBF" AS t
where p.pol_idx = t.pol_idx
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 125
Joined: Wed Apr 21, 2010 7:27 pm

Re: Simple joins work via command line, but not in GUI

Postby somethingsimil » Mon Apr 08, 2019 4:14 pm

Thank you, that worked. ...but it begs the question - is the SQL interpreter for the command line different from the GUI? Because I am using the GUI to validate the SQLs that I'm then adding to me command line scripts, and I would hate to think they aren't always returning the same results.

Thanks again.
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm

Re: Simple joins work via command line, but not in GUI

Postby Admin » Mon Apr 08, 2019 5:04 pm

If an SQL query is being executed w/o any errors, the result set would be the same for GUI and batch mode. No need to compare them.
While running an SQL in GUI, DBF Commander tries to find short table names in the SQL text in order to replace them with full paths. This is the only difference.
Best regards,
Oleg Zhechkov
User avatar
Admin
Site Admin
 
Posts: 125
Joined: Wed Apr 21, 2010 7:27 pm

Re: Simple joins work via command line, but not in GUI

Postby somethingsimil » Mon Apr 08, 2019 5:13 pm

Understood - many thanks.
somethingsimil
 
Posts: 30
Joined: Tue Jul 08, 2014 6:05 pm


Return to DBF Commander Professional

Who is online

Users browsing this forum: No registered users and 1 guest

cron