Formatting Data from Stored Procedure
Formatting Data from Stored Procedure
(OP)
I have extracted some data using a stored procedure. the following works perfectly...
-* File mySQL.FEX
-DEFAULT &YEAR='2003';
-DEFAULT &WEEK='20';
SET SQLENGINE=SQLMSS
SQL EX [server].DBASE.DBO.SPROC &YEAR,&WEEK;
TABLE FILE SQLOUT
PRINT *
END
...However, I want to format the output from this Print * Statement. It won't work. I have tried to specify the fieldnames that I expect to get from the Print * function but it still fails.
I have also attempted to depoit to a hold file, which works, but then when I call on the hold file using the field names it say's field name not recognised.
Someone please put me out of my misery.
Cheers
Matthew
-* File mySQL.FEX
-DEFAULT &YEAR='2003';
-DEFAULT &WEEK='20';
SET SQLENGINE=SQLMSS
SQL EX [server].DBASE.DBO.SPROC &YEAR,&WEEK;
TABLE FILE SQLOUT
PRINT *
END
...However, I want to format the output from this Print * Statement. It won't work. I have tried to specify the fieldnames that I expect to get from the Print * function but it still fails.
I have also attempted to depoit to a hold file, which works, but then when I call on the hold file using the field names it say's field name not recognised.
Someone please put me out of my misery.
Cheers
Matthew
RE: Formatting Data from Stored Procedure
In the script include the syntax ' ON TABLE HOLD AS MPHOLD ' after the print
-* File mySQL.FEX
-DEFAULT &YEAR='2003';
-DEFAULT &WEEK='20';
SET SQLENGINE=SQLMSS
SQL EX [server].DBASE.DBO.SPROC &YEAR,&WEEK;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS MPHOLD
END
Run this so that it creates the hold file. Then in the WF GUI environment open the application and create a report. point the report to the hold file MPHOLD.
Hey Presto ,
Cheers
Matthew Paba