Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone.
Can I have a script that turns my records into column names?
Example:
Table
--------
Scenario; Name, LastName, Married
1, John; Kimball; Yes
1, Mary; Kimball; No
2, John; Kimball; No
2, Mary; Kimball; No
Final Table
---------------
Scenario; John_Kimball; Mary_Kimball
1, Yes, No
2, No, No
The solution would be something like the following script, but of course it does not work that way:
LOAD Married AS Name & '_' & LastName RESIDENT Table;
Thanks.
Hello,
Try the following:
Original:LOAD * INLINE [Scenario, Name, LastName, Married1, John, Kimball, Yes1, Mary, Kimball, No2, John, Kimball, No2, Mary, Kimball, No]; Step1:LOAD Scenario, Name & '_' & LastName, MarriedRESIDENT Original; DROP TABLE Original; Step2:GENERIC LOAD *RESIDENT Step1; DROP TABLE Step1;
Hope that helps
Hello,
Try the following:
Original:LOAD * INLINE [Scenario, Name, LastName, Married1, John, Kimball, Yes1, Mary, Kimball, No2, John, Kimball, No2, Mary, Kimball, No]; Step1:LOAD Scenario, Name & '_' & LastName, MarriedRESIDENT Original; DROP TABLE Original; Step2:GENERIC LOAD *RESIDENT Step1; DROP TABLE Step1;
Hope that helps