user1874594 user1874594 - 6 months ago 42
SQL Question

reg . Teradata SQL / BTEQ / BTET . Export to an excel report with 2 tabs using BTEQ

I can do this beautifully in

SQL Assistant
and the result will show up in 2 tabs which can be saved to an
excel
file with 2 tabs.

BT;
sel <query1>
;
Sel <query2>
;
ET


I want to know if something similar can be done in
BTEQ
. I am prolly hoping against hope but I thought I'd had done my asking around. Using
BTEQ
I can export 2 different queries to 2 different
excel
files , and that is fine. I want to know if, its poss. to export the o/p of 2 queries into a single
excel
file with 2 tabs


and a small corollary question : In
SQL Assistant
, is it poss to export the result of 2 queries run serially to a 2 tab ,
excel
report by some method other than
BTET

( P.S
BTET
in
BTEQ
is meaningless , I am using it only in
SQL Ass
. So dont mean using
BTET
)

Answer

In SQL Assistant there's a setting Tools -> Options -> General -> Use a separate Answer window for which is set by default to Each Query. When you run multiple Select either using F5 or F9 you get all result sets as tabs in a single window and the File -> Save then asks for Save all sheets? This is independent of BT/ET.

In BTEQ there's no way to get multiple results into one file, in fact there's no support for Excel, it's only the very old DIF format which doesn't support multiple tabs.