Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
On using 2 sqls
 Login/Join
 
Member
posted
hi,

I am generating a SQL report.

My question is, how do i use two different SQL's (can't join those SQL's) in a single fex?

I want to hold the output of one SQL in a variable and show it in report header?

Help me..


Vasantha kumar
7.1.4/ Unix / OF:EXL2K
 
Posts: 23 | Registered: July 02, 2008Report This Post
Expert
posted Hide Post
your puzzle is that you want 2 SQLOUT files?
is that it?
create the first one and 'rename' it.
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS MYFIRSTONE
END
now create the second one.
you'll have 2 flat files now in your agent
the first called MYFIRSTONE
and the 2nd called SQLOUT
is that your question?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Dane>
posted
Vasantha, try this:
ON TABLE HOLD AS HOLDONE
END
HOLD AS HOLDTWO
you can just redump the interal matrix after the table request.
 
Report This Post
Expert
posted Hide Post
Vasantha,

Here is an example, using MSSQL, related to your question:

Say, you have a fex called RPT1. In RPT1 is the following:

  
-DEFAULT &SERVER_NAME = 'xx.x.x.xxx';
-SET &CONNECTION      = IF &SERVER_NAME EQ 'x.x.x.xxx' THEN 'development' ELSE  'prodution';
-*------------------------------------------------------------------------
-* Call Stored Procedure #1
-*------------------------------------------------------------------------
SQL SQLMSS SET SERVER &CONNECTION
SQL SQLMSS EX DataBase.DBO.SQL_Stored_proc1 '&VAR1', '&VAR2', '&VAR3', &VAR4;
 
-*------------------------------------------------------------------------
-* Read the data into a hold file.
-*------------------------------------------------------------------------
TABLE FILE SQLOUT
SUM
    COLUMN1
    COLUMN2
    COLUMN3
 ON TABLE HOLD AS PASS1 FORMAT ALPHA
END
-RUN
-READ PASS1 &COL1.AXX. &COL2.AXX. &COL3.AXX

-*------------------------------------------------------------------------
-* Call Stored Procedure #2
-*------------------------------------------------------------------------
SQL SQLMSS SET SERVER &CONNECTION
SQL SQLMSS EX DataBase.DBO.SQL_Stored_proc2 '&VAR1', '&VAR2', '&VAR3', &VAR4;
 
-*------------------------------------------------------------------------
-* Read the data into a hold file.
-*------------------------------------------------------------------------
TABLE FILE SQLOUT
SUM
    COLUMN1
    COLUMN2
    COLUMN3
 ON TABLE HOLD AS PASS2 FORMAT ALPHA
END
-RUN


The report is now generated from the HOLD file PASS2.
&COL1, &COL2, &COL3 are now available to be placed in your HEADING

&SERVER_NAME and &CONNECTION are examples only, you need to replace them with your data

&VAR 1-4 are variables being passed to the stored proc.

Hope this helps...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders