I am trying to export DDL of procedures to file with BTEQ. My script looks like:
.SET WIDTH 65531 .LOGON **bleep**/**bleep**, **bleep** .SET TITLEDASHES OFF .EXPORT FILE = 'c:\...\[db_name]\[proc_name].sql' SHOW PROCEDURE [db_name].[proc_name]; .EXPORT RESET .QUIT
This script worked for me with no problems several years till now, when working on different TD database (new workplace).
The problem is, that for some procedures, exported SHOW PROCEDURE in the exported file is pure nonsense - it contains a mix of DDLs of completely different objects (part of some view and part of the procedure?!?!). For some other procedures, the exported result is OK. When running the SHOW PROCEDURE statement in the TD Assistant, the result DDL is OK. It happens only when running SHOW PROCEDURE with BTEQ.
I am using TD:
RELEASE 14.10.07.09 VERSION 14.10.07.10
Teradata BTEQ 16.20.00.07 (32-bit) for WIN32. PID: 10880 Copyright 1984-2018 Teradata. All rights reserved. Enter your logon or BTEQ command:
Do any of you have any idea what is wrong with that, or I am doing something wrong?
Solved! Go to Solution.