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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Trouble with Multiple SQL Passthrough Statements

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Trouble with Multiple SQL Passthrough Statements
 Login/Join
 
Member
posted
Are you permitted to have multiple SQL Passthrough Statments? I have a report that the users drill down to (it's a PDF document that they have to send to our customer). When they get to that report, I want to run a SQL Update statement to fill in a date on the SQL table so they know they generated the PDF for that sale. The report originally used the results from a SQL procedure as its data. Now, when I try to add in this additional SQL Update statement, I get an error saying that SQLOUT is not defined.
Any help would be appreciated!


WF 7.62, SQL 2000, Windows XP
 
Posts: 16 | Location: Philadelphia, PA | Registered: May 12, 2005Report This Post
Expert
posted Hide Post
You need to process the SQLOUT after each SQL statement -

SQL
  UPDATE tablename
     SET columnname = 'value'
;
TABLE FILE SQLOUT
PRINT *
END
SQL
  UPDATE tablename
     SET columnname = 'value'
;
TABLE FILE SQLOUT
PRINT *
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Please take a moment to read This.
Thanks


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Perfect! Thank you!


WF 7.62, SQL 2000, Windows XP
 
Posts: 16 | Location: Philadelphia, PA | Registered: May 12, 2005Report This Post
Master
posted Hide Post
An easier way of doing this is to rename your SQLOUT.
SQL
SELECT *
FROM tablename
;
TABLE
ON TABLE HOLD AS HOLD1
END
-RUN
You can then use your SQLOUT files as you would any other focus file.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
PB,

I think you might have missed the point here. MED wanted to process multiple SQL statements not keep hold of the SQLOUT contents (which would be blank anyway on updates and deletes).

But in any case, please update your signature as per this friendly reminder Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
I don't think you need the TABLE and HOLD syntax if you're not expecting to return any data.

I have this working in a program:

SET SQLENGINE = SQLMSS
SQL SET SERVER EIDW
-RUN

SQL INSERT EIDW.dbo.SAPI_Save
(
ReportGuid,
SavedDateTime,
...
)

VALUES
(
(newid()),
'&CURR_DATE &CURR_TIME...000',
...
)
END
-RUN

No SQLOUT, no TABLE, no HOLD.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Franics,

That is a single SQL statement and it is still terminated by the END statement which amounts to the same thing as the TABLE FILE ....

Probably the better method as no extraneous code lurks about serving to confuse the poor support person who's been left with the code Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
I have this in a dialogue manager loop - the code is executed several times:

SQL INSERT EIDW.dbo.Filter
(ReportGuid, FilterID, FilterValueCount, FilterValueString)
VALUES ('&REPORTGUID', 'C&FILT.EVAL', &C&FILT.EVAL0,
'&FILT_STR')
END
-RUN

I didn't realize there was an implicit TABLE FILE after each SQL statement.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I think that the END statement does that?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
quote:
Originally posted by Tony A:
I think that the END statement does that?

T


Tony I believe you are correct.

Ira AIX 533 WF 5.3.6 (TEST 7.6.1)
 
Posts: 29 | Registered: March 30, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Trouble with Multiple SQL Passthrough Statements

Copyright © 1996-2020 Information Builders