how to export table values into a file?

Analytics
Enthusiast

how to export table values into a file?


Hi All,

Is it possible to export the table values generated from a select query into a file ???

I have tried using the tools menu >> export option - but this only exports the queryman history values. I am looking at exporting the actual data in the in table to a file ??

It would be great if any of u can help me with this...!!

Thanks,

Rock
5 REPLIES
Teradata Employee

Re: how to export table values into a file?

Hey Rock,

I am on SQL Asst 7.2, and was on 6.2 earlier. From the File menu, toward the bottom there is Export Results and Import Data (or similar wording). These are toggles, and you turn them on and off. If you turn the export on and then F5 your query, you should be prompted for a file to save to. This should then save to a tab-delimited text file of your naming.

What version of SQL Asst/Queryman are you on?

Andrew Livingston
Enthusiast

Re: how to export table values into a file?

hey Andrew,

My situation is the same as that of rock's. I tried your option. Is there any way to send this output to an Excel file?

Later, I could modify by creating a macro to export on to different sheets on an Excel file.

Any suggestions?

Thank you

Regards,
Enthusiast

Re: how to export table values into a file?

I found the way to do the exporting to excel. Export button
Enthusiast

Re: how to export table values into a file?

Hi,

Why dont u use script?...
. logtable urtablelog;
.logon......;
.begin export sesions ;
.layout ;
.field * char(size); ......

.import infile ;
.export format text mode record;

select (case when urfield is null then cast('?' as char(1)) else trim(cast(urfield) as char(size))) end (titile '')
........where values .....

Thanks and regards,
Raja
Enthusiast

Re: how to export table values into a file?

Hello Raja,

Thanks for your reply. My next approach is that I will use scripting.

Right now, I have access only to SQL Assistant.
I will install the express edition and implement the scripting assignment pretty soon.

Thank you

Regards,