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     [no solution]WEBFOCUS can't get "FOR XML" out put from SQL Server?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[no solution]WEBFOCUS can't get "FOR XML" out put from SQL Server?
 Login/Join
 
Platinum Member
posted
I am trying to get a hierarchy XML output from SQL server using 'FOR XML PATH' query. It works in SQL Server but in webfocus it returns an error message:


(FOC1400) SQLCODE IS 6819 (HEX: 00001AA3) XOPEN: 42000
: Microsoft SQL Native Client: [42000] The FOR XML clause is not allowed i
: n a CURSOR statement.

The webfocus version is 7.6.x. Does higher webfocus version support this?

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


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
Virtuoso
posted Hide Post
I could test it for you in 8105 if you provide code that works with generic data in SQL server like Northwind.

You might also get the same results with
ON TABLE PCHOLD FORMAT XML

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


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by BabakNYC:
I could test it for you in 8105 if you provide code that works with generic data in SQL server like Northwind.

You might also get the same results with
ON TABLE PCHOLD FORMAT XML



"ON TABLE PCHOLD FORMAT XML" outputs flat XML. I want a hierarchy XML that can only be done on SQL server.

Can you try any SQL select statement, just add

FOR XML AUTO

at the end of that statement?

Thanks.


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
Virtuoso
posted Hide Post
I tested in 8105. I don't get an error when I run this SQL:

ENGINE SQLMSS SET DEFAULT_CONNECTION TEST
SQL SQLMSS PREPARE SQLOUT FOR
select orderid, CustomerID from [dbo].[Orders]
FOR XML AUTO
END
TABLE FILE SQLOUT
PRINT *
END

However, the output is a single BLOB column with content I can't decipher. The column TITLE is similar to what I see in SQL Server but printing it returns data I don't recognize. But PRINT of a BLOB column may be the reason why I get these


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
I ran this code in 8.0.09:
ENGINE SQLMSS SET DEFAULT_CONNECTION SNAKE
SQL SQLMSS PREPARE SQLOUT FOR
SELECT [BI_PROJECT_BY]
      ,[BI_AWARD_BY]
      ,[PROJECT_ID]
      ,[BI_BUDGET_YEAR]
      ,[DESCR]
  FROM [FMSIBIDEV].[dbo].[BI_DM_DETAIL]
  WHERE
  PROJECT_ID IN ('210284','207453','217219') 
  ORDER BY BI_PROJECT_BY, BI_BUDGET_YEAR
FOR XML AUTO
END
-RUN
TABLE FILE SQLOUT
PRINT *
END


The output was:
XML_F52E2B61-18A1-11d1-B105-00805F49916B
2016-01-12-12-35-10t000029s000222bin
2016-01-12-12-35-10t000029s000223bin
2016-01-12-12-35-10t000029s000224bin
2016-01-12-12-35-10t000029s000225bin
2016-01-12-12-35-10t000029s000226bin
2016-01-12-12-35-10t000029s000227bin
2016-01-12-12-35-10t000029s000228bin
2016-01-12-12-35-10t000029s000229bin
2016-01-12-12-35-10t000029s000230bin
2016-01-12-12-35-10t000029s000231bin
2016-01-12-12-35-10t000029s000232bin
2016-01-12-12-35-10t000029s000233bin
2016-01-12-12-35-10t000029s000234bin
2016-01-12-12-35-10t000029s000235bin
2016-01-12-12-35-10t000029s000236bin
2016-01-12-12-35-10t000029s000237bin
2016-01-12-12-35-10t000029s000238bin
2016-01-12-12-35-10t000029s000239bin
2016-01-12-12-35-10t000029s000240bin
2016-01-12-12-35-10t000029s000241bin


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
 
Posts: 115 | Location: Seattle, WA | Registered: April 07, 2015Report This Post
Platinum Member
posted Hide Post
I guess that's not possible. Thanks for the test.


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
Platinum Member
posted Hide Post
quote:
Originally posted by BabakNYC:
I tested in 8105. I don't get an error when I run this SQL:

ENGINE SQLMSS SET DEFAULT_CONNECTION TEST
SQL SQLMSS PREPARE SQLOUT FOR
select orderid, CustomerID from [dbo].[Orders]
FOR XML AUTO
END
TABLE FILE SQLOUT
PRINT *
END

However, the output is a single BLOB column with content I can't decipher. The column TITLE is similar to what I see in SQL Server but printing it returns data I don't recognize. But PRINT of a BLOB column may be the reason why I get these



BabakNYC, Can you use "ON TABLE PCHOLD FORMAT XML" in the last output?


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  WebFOCUS/FOCUS Forum on Focal Point     [no solution]WEBFOCUS can't get "FOR XML" out put from SQL Server?

Copyright © 1996-2020 Information Builders