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

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Appending BY field value to get result in a single row
Go
New
Search
Notify
Tools
Reply
  
Appending BY field value to get result in a single row
 Login/Join
 
Platinum Member
posted
Hi,

I have a table request from a cluster join.
The output looks as shown below.

Col1 Col2 Col3 Col4 Col5 Col6 Col7
xx    yy   zz   aa   bb   cc   dd
xx    yy   zz   aa   ss   cc   dd 


Only the Col5 is different and upon checking with the database team,it turns that there is nothing wrong with the data.
How can i display only one row with bb and ss appended in Col5.?

If someone can provide any logic to that ,it would be helpful.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I've no idea what you're trying to do. Could you show us the code and expand on the issue you've run into?


WebFOCUS 8206, Unix, Windows
 
Posts: 1660 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Appologies for the lack of detail.


Now when i do
 
TABLE FILE DEMO_CLUSTER
BY Col1
BY Col2
BY Col3
BY Col4
BY Col5
BY Col6
BY Col7
END

I get two rows of data as shown above.
I don't have an actual code to show the output,because it is complex and involves lots of defines and computes.


I am trying to print the out the result into a single row as below.

  
Col1 Col2 Col3 Col4 Col5    Col6 Col7
xx    yy   zz   aa   bb|ss   cc   dd


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Try creating a DEFINE that checks the last value of the column and if it's not the same, concatenates it to itself. Something like
  
IF COL5 NE LAST COL5 THEN ....


WebFOCUS 8206, Unix, Windows
 
Posts: 1660 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Good one. I was about to suggest that... And use the DFINEd field instead of COL5.
 
Posts: 2984 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Appending BY field value to get result in a single row

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