Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
PIVOT and UNPIVOT
 Login/Join
 
Member
posted
When creating a Flow, Is there an equivalent to the SQL PIVOT and UNPIVOT relational operators?


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 9 | Registered: October 20, 2011Reply With QuoteReport This Post
Guru
posted Hide Post
Assuming you mean a DataMigrator data flow, while there is no direct equivalent in the SQL used there, it is possible with techniques such as those described in the forum postTranspose rows into columns

Alternately you can use database specific SQL functions in a DBMS SQL Flow, or by creating a synonym for an external SQL script.
 
Posts: 389 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
quote:
DataMigrator


Thank you Clif for your relpy.

I looked at the suggested forum post. This would work for an equivalent PIVOT solution.

I also built an UNPIVOT query in a DBMS SQL Flow that populates an existing table , but the solution seems slow (over an hour to write about 300,000 records).

I’m about to try a synonym for an external SQL script. I’ll let you know how this goes.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 9 | Registered: October 20, 2011Reply With QuoteReport This Post
Guru
posted Hide Post
A DBMS SQL Flow and creating a synonym for an external SQL script are two means to the same end. In either case the database specific SQL is passed through directly to the underlying relational database which executes the query. Throughput will be comparable.
 
Posts: 389 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 


Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.