Formatting BUG in BTEQ EXPORT of a SHOW Procedure

Tools & Utilities
Fan

Formatting BUG in BTEQ EXPORT of a SHOW Procedure

Hi everyone,

when trying export to a local text file a Procedure DDL

BTEQ add a "space" character between schema and procedure name

Here it is BTEQ script (login/logoff is omitted) ------------------------------------------

.SET WIDTH 3000

.SET TITLEDASHES OFF

.SET FORMAT OFF

.SET RTITLE ''

.SET SESSION RESPBUFLEN MAX1MB

.EXPORT RESET

.EXPORT REPORT FILE=myschema.myprocedurename.sql

SHOW Procedure myschema.myprocedurename;

.IF ERRORLEVEL != 0 THEN .EXIT ERRORCODE;

Here it is content of myschema.myprocedurename.sql (first lines) ----------------

REPLACE PROCEDURE myschema. myprocedurename <-- !!!! NOTICE THE SPACE AFTER DOT

(

IN  param1 VARCHAR(2),

OUT param2 INTEGER

)

BEGIN ...

---------------------------------------------------------------------------------------------------

I try to run same command in SQLAssistant and all is ok (no space after dot).

Can anyone explain this behavior and eventually how to fix ?

Thanks

Bertax

4 REPLIES
Senior Supporter

Re: Formatting BUG in BTEQ EXPORT of a SHOW Procedure

what is your issue with the blank?

it is still valid and executable

try

select * from sys_calendar     .     calendar where date = calendar_Date;

...

Enthusiast

Re: Formatting BUG in BTEQ EXPORT of a SHOW Procedure

hmm... are you using variables in the place of procedure name? check the variables for spaces using echo statement, use trim etc. 

have wasted hours because of these spaces.

Fan

Re: Formatting BUG in BTEQ EXPORT of a SHOW Procedure

I don't use variables in the place of procedure name.

Just want report different behavior between SQLA & BTEQ.

tester023 : I'm sorry if you "wasted" time ...

Teradata Employee

Re: Formatting BUG in BTEQ EXPORT of a SHOW Procedure

First, BTEQ is using Field Mode to get the DBS' response data whereas SQLA is not. Second, BTEQ is -- by design -- adding the space to ensure acceptable concatenation of the parcels returned for the SHOW.