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     [CLOSED] Converting Multiple Columns into One
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Converting Multiple Columns into One
 Login/Join
 
Member
posted
I have a hold file created that structures my table as one row with multiple columns, like so:

Param1Name Param1Mean Param1Std Param2Name Param2Mean Param2Std Param3Name Param3Mean Param3Std etc..

I need to format the table as:

ParamName ParamMean ParamStd

Param1Name Param1Mean Param1Std
Param2Name Param2Mean Param2Std
etc...

I'm pretty new to WebFocus, so please explain suggestions!

Thank you!

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 2 | Registered: July 16, 2019Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Using the columns as BY fields should work. Except if we're missing information...

For each value in ParamName & ParamMean & ParamStd it will generate a new line
TABLE FILE abc
BY ParamName
BY ParamMean
BY ParamStd
ON TABLE SET BYDISPLAY ON
END


Please use the code tag when posting sample data or code
It's the last icon on the ribbon that looks like the below
</>


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2191 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
In this case you can use OVER:

TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS TST
END

TABLE FILE TST
PRINT
 CAR AS ''
 MODEL AS '' OVER
 COUNTRY AS ''
 SEATS AS ''
END
  


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 399 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
So, each row in your source file can have a different amount of 'groups' of data, as in "Param1Name Param1Mean Param1Std" to "Param#Name Param#Mean Param#Std", where the '#' can vary from 1 to 'a lot'?
If so, you may be able to loop thru it to break it down.
 
Posts: 3020 | 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     [CLOSED] Converting Multiple Columns into One

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