Print Thread
Limitation on Export data as SQL file
#65668 04/25/24 09:36 PM
Joined: Apr 2024
Posts: 1
J
jonwat Offline OP
Member
OP Offline
Member
J
Joined: Apr 2024
Posts: 1
If you have a query like:

with some_CTE as
(...)
select [some_columns]
from
(select [columns]
from complicated query
join some_CTE on ...)

then using either version of Export Results you cannot export the data as a SQL file (or to clipboard as a SQL file) I believe it is because the export process is unable to figure out what you want the target table to be, as in :

insert into [some target table] (FILE_NO, BENEFIT, AMT_3YRS, LAST_DATE)
values (728833, 'Non-medical Transportation-Household Moving and Storage-In District', 958.15, '2024-01-21');

Using a SQL file was by far the easiest way to accomplish what I needed (transferring data from Oracle to SQLite), and the only way I could do this was to save the results to a temporary table using CTAS and then select from the temporary table and create the SQL file from that. Moving the CTE into the query didn't help.

Apart from the fact that it took a while to figure out what was going on (the export just does nothing; doesn't pop up an error message), it would be much more sensible to ask for a name for the target table when it cannot figure it out.

Jon

Re: Limitation on Export data as SQL file
jonwat #65671 04/26/24 08:39 AM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I have added this to the list of enhancement requests.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.036s Queries: 16 (0.008s) Memory: 2.4980 MB (Peak: 3.0395 MB) Data Comp: Off Server Time: 2024-05-05 15:08:01 UTC
Valid HTML 5 and Valid CSS