Focal Point
Oracle SQL in Webfocus with length desc prior to field values

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8671019242

August 20, 2007, 05:35 PM
patino
Oracle SQL in Webfocus with length desc prior to field values
Hi! I am trying to query an oracle DB using SQL in webfocus. Once I do a table hold and review my hold file. I am seeing a field value description prior to every fields. I tried using format alpha but it didn't help. Thanks in advance.

e.g. hold file

Firstname for 5 bytes field, Lastname for 5 bytes field

003Joe 005Smith

ENGINE SQLORA SET DEFAULT_CONNECTION TEST
SQL SQLORA PREPARE SQLOUT FOR
SELECT LAST_NAME,FIRST_NAME;
END

TABLE FILE SQLOUT
PRINT LAST_NAME FIRST_NAME
ON TABLE HOLD AS TEST1 FORMAT ALPHA
END

-RUN


WebFocus 7.1.6 Local Platform:Windows XP Pro/W3k Server. Use:Integration (Oracle,VMS), Reporting
August 20, 2007, 05:48 PM
Leah
quote:
PRINT LAST_NAME FIRST_NAME

You appear to be getting 'column headings' try
PRINT LAST_NAME AS '' FIRST_NAME AS '',
NOTE NO SPACE BETWEEN SINGLE QUOTE MARKS.


Leah
August 20, 2007, 05:51 PM
patino
I just tried it. It didn't work. Thanks.


WebFocus 7.1.6 Local Platform:Windows XP Pro/W3k Server. Use:Integration (Oracle,VMS), Reporting
August 20, 2007, 06:00 PM
Francis Mariani
quote:
Firstname for 5 bytes field, Lastname for 5 bytes field


You mean "Firstname for 3 bytes field, Lastname for 5 bytes field".

How are the columns defined in the Oracle table?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 20, 2007, 06:12 PM
patino
Actual Oracle Fields:

SPRIDEN_ID VARCHAR2(9 BYTE) NOT NULL,
SPRIDEN_LAST_NAME VARCHAR2(60 BYTE) NOT NULL,
SPRIDEN_FIRST_NAME VARCHAR2(15 BYTE)

Actual Output:

000009A00000999 534390000005AAAAA 00006AAAAAA

I replaced the first and last with AA's. Thanks.


WebFocus 7.1.6 Local Platform:Windows XP Pro/W3k Server. Use:Integration (Oracle,VMS), Reporting
August 20, 2007, 06:50 PM
N.Selph
Add this to your procedure (or global profile)

SQL SQLORA SET VARCHAR OFF


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
August 20, 2007, 09:21 PM
patino
N.Selph, Thank you so much! It worked.


WebFocus 7.1.6 Local Platform:Windows XP Pro/W3k Server. Use:Integration (Oracle,VMS), Reporting