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  iWay Software Product Forum on Focal Point    [CLOSED] Using common table expressions (CTEs) in DBMS SQL Flow

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Using common table expressions (CTEs) in DBMS SQL Flow
 Login/Join
 
Member
posted
I am trying to create a DBMS SQL Flow where the SQL statement contains common table expressions. When I try to run the SQL, I get...

(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF)
: Microsoft OLE DB Provider for SQL Server: [] Multiple-step OLE DB operat
: ion generated errors. Check each OLE DB status value, if available. No w
: ork was done.
(FOC1406) SQL OPEN CURSOR ERROR. : SQLOUT

I had this issue before with a DM procedure. I had an SQL statement that had a CTE in it. I was able to use it by using the following commands before the SQL statement and then ending it with END.

ENGINE SQLMSS SET CURSORS CLIENT

SQL SQLMSS PREPARE TEMP_HOLD FOR

If I try to use this inside the DBMS SQL Flow, I get...

(FOC1400) SQLCODE IS 195 (HEX: 000000C3) XOPEN: 42000
: Microsoft OLE DB Provider for SQL Server: [42000] 'CURSORS' is not a rec
: ognized SET option. [42000] Incorrect syntax near the keyword 'with'. If
: this statement is a common table expression, an xmlnamespaces clause or
: a change tracking context clause, the previous statement must be termin
: ated with a semicolon. [42000] Incorrect syntax near ','. [42000] Incorr
: ect syntax near ','.
(FOC1414) EXECUTE IMMEDIATE ERROR.

Any ideas on how to get this working with changing the SQL around to remove the CTEs?

This message has been edited. Last edited by: Tamra,


iDM 7.7.05
WebFOCUS 7.7.05
Windows, All Outputs
 
Posts: 11 | Registered: May 25, 2012Report This Post
Guru
posted Hide Post
Because the MS SQL Server error message complains of a missing semicolon I have suspicion that the issue, and thus a possible workaround is the same as in this forum post:

Using MERGE in a DM procedure

However could you provide an example of your MS SQL Server SELECT statement?


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Platinum Member
posted Hide Post
I have the same problem with webfocus MSSQL Native Client connecting to SQL 2008.

But CTE works with Oracle passthrough.

It must be webfocus connector issue.

I didn't bother to open a case as this kind of case would most likely just waste your time. I ended up using MERGE to concat sub queries.


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] Using common table expressions (CTEs) in DBMS SQL Flow

Copyright © 1996-2020 Information Builders