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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
One of the files, i am working with, has 7 columns, with names representing a day of the week in date format. The data in these columns is numeric and represents units for each day - similar to the below: ProductName 7/14/2012 7/16/2012 7/17/2012 Product A 6 5 6
As you see, the 'Date' columns are dynamic and will change based on the specific week, but I will always have 7 columns representing each day in a week, so in Data Migrator flow, I need to capture day1 (field 19 for instance) and day7 and pass the values of these COLUMN NAMES as actual data to Start_date and End_date columns. Please note that I used generic column names (Fieldname1, Fieldname2, Fieldname3..etc) in a synonym, so I can isolate what are the Date values where FiledName1 = 'ProductName'. Is there a way to dynamically manage updating the start/end date columns based on source data? I was loking for some define statement that can be added to the synonym , but could not find anything useful(working).
WebFOCUS 7.7, iWay Data Migrator, Windows Excel, PDF, HTML, XML
Just saw your reply. I did this by creating two synonyms, one for the data rows ANNAR with HEADER=YES, and one for the header line ANNAH with HEADER=NO. Then joined ANNAR to a sub-select:
SELECT T1. all columns needed..., T2.START_DATE , T2.END_DATE FROM (annar T1 LEFT OUTER JOIN (SELECT 'ALL' AS LOCATION , T1.DAY1 AS START_DATE , T1.DAY2 AS END_DATE FROM annah T1 WHERE T1.LOCATION = 'Location' ) T2 ON T1.LOCATION = T2.LOCATION )
Posts: 397 | Location: New York City | Registered: May 03, 2007