Toad World® Forums

Want to save a Fixed Width Text File

I have a query that I would like to automatically save to a fixed width text file, although the columns can have different widths, from Toad Data Point 3.2.

Here are the different methods I’ve tried:

  • Tools\Export\Export Wizard allows me to build and save an export template but doesn’t have the option for custom column widths

  • Right clicking on the Result Set of the query I just executed and selecting Export\Export Wizard does give the option to enter custom column widths but it doesn’t give me the option to save the export template.

  • From the Report designer I can export the document as a .txt file manually. It’s in the proper format because I lpad & rpad everything to the proper widths. But when I go to automate the .tdr I lose the option of exporting it as a . txt file.

Thanks for your help!

Jason Horn

Database Analyst

Concordia University

If you use the Export Fixed Width Type you can edit the fixed width size as shown below.

Debbie

Hi Debbie,

I get that option, when right clicking the query results and selecting the query wizard, but it doesn’t allow me to save it as an export template so I can’t use it in a .tas. From the tools menu/Export Wizard I don’t get the option of selecting columns but I do get the option of saving the export template. I need both.

Thanks,

-Jason Horn

Crap! I see what you mean. I entered Cr110433 for this.

The only work around I have for you at this time would be this:

Create Export template to save query results to table in local storage.

Create Export template from that table with fixed width column lengths.

I know it is not very elegant of a solution, but would work. We will get this bug fixed for the next release.

Debbie

From: JLHorn [mailto:bounce-JLHorn@toadworld.com]

Sent: Monday, June 24, 2013 5:09 PM

To: toaddatapoint@toadworld.com

Subject: RE: [Toad Data Point - Discussion Forum] Want to save a Fixed Width Text File

RE: Want to save a Fixed Width Text File

Reply by JLHorn

Hi Debbie,

I get that option, when right clicking the query results and selecting the query wizard, but it doesn’t allow me to save it as an export template so I can’t use it in a .tas. From the tools
menu/Export Wizard I don’t get the option of selecting columns but I do get the option of saving the export template. I need both.

Thanks,

-Jason Horn

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from General
notifications altogether.

Toad Data Point - Discussion Forum

Flag
this post as spam/abuse.

Thanks Debbie!

I was able to create an import template to get the data into the local storage table and then created an export template from local storage table in the format
I needed.

Jason L. Horn


Database Analyst

Concordia University

t 503-493-6557

2811 NE Holman Street Portland, OR 97211

www.cu-portland.edu

From: Debbie Peabody [mailto:bounce-Debbie_Peabody@toadworld.com]

Sent: Monday, June 24, 2013 6:46 PM

To: toaddatapoint@toadworld.com

Subject: RE: [Toad Data Point - Discussion Forum] Want to save a Fixed Width Text File

RE: Want to save a Fixed Width Text File

Reply by Debbie Peabody

Crap! I see what you mean. I entered Cr110433 for this.

The only work around I have for you at this time would be this:

Create Export template to save query results to table in local storage.

Create Export template from that table with fixed width column lengths.

I know it is not very elegant of a solution, but would work. We will get this bug fixed for the next release.

Debbie

Click to show quoted text

From: JLHorn [mailto:bounce-JLHorn@toadworld.com]

Sent: Monday, June 24, 2013 5:09 PM

To: toaddatapoint@toadworld.com

Subject: RE: [Toad Data Point - Discussion Forum] Want to save a Fixed Width Text File

RE:
Want to save a Fixed Width Text File

Reply by JLHorn

Hi Debbie,

I get that option, when right clicking the query results and selecting the query wizard, but it doesn’t allow me to save it as an export template so I can’t use it in a .tas. From the tools
menu/Export Wizard I don’t get the option of selecting columns but I do get the option of saving the export template. I need both.

Thanks,

-Jason Horn

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from General
notifications altogether.

Toad Data Point - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from General
notifications altogether.

Toad Data Point - Discussion Forum

Flag
this post as spam/abuse.

Hi Debbie, my team is using Toad Data Point 3.8 and we are having the same issues. Not seeing a fix to this issue. Can you confirm? Thanks

With TDP 3.8, right clicking the query results and selecting the export wizard, you should be able to save it as an export template to use in automation. What exact issue did you get? Could you show us a screenshot?

I just tested this using our current version TDP 3.8 and it works fine for me.

I appreciate being able to set the column widths-- however when I do this it appears to still take the default value set on the previous screen with a warning icon – I am trying to export from a query file – to a fixed column width .txt file-- (each column has a different width) is there something I am missing?

The “default fixed width size” in “select output format page” is used to set a uniform size for all columns, which will be memorized by TDP for later user. By default, all columns are set to the same size, The warning sign just let you know that it may give extra space on narrow columns and truncate data on wide columns.

You have to adjust the column width manually if you want each columns have different width in “select columns” page.

Hope this helps.

I appreciate the clarification on that – my issue is that I can’t turn off the default fixed width–

whenever I select fixed column width-- a default value is supplied and gets used–

1-- export objects list

2-- click edit

3-- verify my query (pulling from a file)

4-- set my output format to fixed column width (by default the default width size goes to 60)

5-- set fixed width for each field

6-- set my paths and what not –

I still get a file that sets every field in it to 60–

I’ve tried setting the fixed width value to 0 and get a zero width column–

I created QAT-7830 to enable the “select columns” page so that you can customize the fixed width when you export a query or query file.

For now, please open the .txp template file in a xml editor or notepadand, look for FixedWidth=“60” and manually change 60 to desired width for your columns.

Hope it helps.