Toad World® Forums

Issues with Using Link SQL File on Select to File Automation

I think we need to reproduce the issue. To do this we need to use your exact SQL file. I assume you are using TDP 3.8. Can you open the SQL file and execute in the SQL Edtior. Then request a support bundle. When the editor has focus it will as if you want to incude rows, You can say no. When done there should be a file called SQLAnalyze.log in the bundle. That should have genereated DDL for the columns in the SQL so we can easily exeucute the sql on no data. Can you do this and post both the SQL file and the SQLAnlyze.log file?

Debbie,

I have the SQL file attached to an earlier post. Unfortunately, it wont let me create a support bundle because it has issues with the SQL (possibly the spacing) and causes an error each time I try to do it. The error says “ERROR: line 12, column 40, ending line 12, column 40: Found ‘>’: Expecting: ( -or - .” This is the location of the first spacing issue that the select to file automation would run into. I can run the SQL though with no problems in the editor though.

Can you get me the DDL for the 6 tables in the SQL? You can try copying the script tab for each table.

Debbie, I hope this helps. I’m not sure if this is exactly what you are looking for, so if not, please let me know what else I may be able to provide. I believe there were 8 tables from what I can tell on this query. Thanks!
DLL_For_Tables_032816.zip (3.27 KB)

I created a similar issue to what you have we are looking into a solution.

Also, I consider the csv issue you mentioned to be a separate issue. Can you send me a sample csv file that shows the values that are causing problems? I assume the issue because we don’t offer a quoting option for csv where we do in the export wizard

P.S. I entered the linked query issue as QAT-7647. I can enter separate issue for csv when I confirm the issue.

Debbie, thanks so much. Regarding the .csv issue. That’s fixed to my knowledge. There was an enhancement that I use all the time that now allows us to select the " on all .csv files from the select to file activity. We no longer have to use the export wizard for every simple query needing quotes around text fields in .csv. It’s made a world of difference and I appreciate ya’ll setting that up for us. Thanks again!

Chad,

I have tried to reproduce the case of “it works everywhere but in automation’s linked-file option” and no success… for me the error happens everywhere - in export activity, in manually export outside of automation, in the sql editor tab… etc.

I need to know:

  1. are you still facing this problem?
  2. does it happen when you copy it from the “Forest and trees” tool only (no other sql-code storage system)? (have you tried other source tools?)
  3. are you able to reproduce this problem with new scripts that do not come out of the “Forest and trees” tool?
  4. do you have this problem with every single script you work with which slows you down and makes it uncomfortable?
    If this is one-time temporary problem I’d suggest you to use the find-and-replace feature to replace all occurrences of the no-break-space character (0xA0 / alt+0160) with a standard space character (0x20 / alt+32). I believe that if sql code (source code) was encoded by the tool then the tool should be able to decode it to it’s original form.

-Martin

Martin. Yes the problem does still exist, but we’ve pretty much moved entirely out of our existing analytics software, which was over 20 years old. We never pasted from anything but this software and are chalking it up to the existing software and I just resolved the issues as they became present when converting by removing the spacing in the SQL.

At this point, all new scripts/queries are created directly in TDP, in which we have not seen any further issues using it directly, even with additional spacing that we might accidentally code in from time to time.

Therefore, I think as far as our business need, this is really a non issue at this point. If others still may run into it, I’m fine with pursuing a fix, but at this point, we’ve worked our way around it and don’t foresee it coming back up using TDP directly for new queries.

Thanks!