All Forums Tools
Bertax 2 posts Joined 12/11
18 Jan 2012
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

ulrich 816 posts Joined 09/09
18 Jan 2012

what is your issue with the blank?

it is still valid and executable

try

select * from sys_calendar     .     calendar where date = calendar_Date;

...

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

tester023 8 posts Joined 12/11
19 Jan 2012

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.

Bertax 2 posts Joined 12/11
19 Jan 2012

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 ...

SuzanneA 9 posts Joined 05/09
19 Jan 2012

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.

You must sign in to leave a comment.