Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikhil2725
Creator II
Creator II

Table

Hi Team,

I Have Table like Below.

PH9PH9_descPH6PH6_descPH3PH3_descDiv_desc
1A2791001insulation1A2791insulation1A2Floor HeatingDiverse Trading
2A7A12001IPS UPVC2A7A12Cements & CleanerIPS2A7Cements & CleanerIPSKKS
2A7A12002IPS CPVC2A7A12Cements & CleanerIPS2A7Cements & CleanerIPSKKS
2A7A12003IPS ABS2A7A12Cements & CleanerIPS2A7Cements & CleanerIPSKKS
2A7A12004Primer & Cleaner2A7A12Cements & CleanerIPS2A7Cements & CleanerIPSKKS
2A8A16001Simona Pressure Pipe2A8A16Simona2A8SimonaFKS
2A8A16002Simona Butt fusion f2A8A16Simona2A8SimonaFKS
2A8A16003Simona Socket fusion2A8A16Simona2A8SimonaFKS
2A8A16004Special Pipe Fitting2A8A16Simona2A8SimonaFKS
2A8A16005Liner Pipes2A8A16Simona2A8SimonaFKS
2A8A16900Simona Rawmaterial2A8A16Simona2A8SimonaFKS
2C1C00001CPC not all. general2C1C00CPC not all. general2C1CPCDistribution Systems
2C1C11001CPC meter sets2C1C11CPC meter sets2C1CPCDistribution Systems
2C1C12001CPC Risers2C1C12CPC Risers2C1CPCDistribution Systems

 

I want to alter the table like this so that It will be helpful to me in order to make the necessary changes. Kindly Help me in this..

PH_NamePH_valuePH_DescDiv_desc
PH91A2791001insulationDiverse Trading
 2A7A12001IPS UPVCKKS
 2A7A12002IPS UPVCKKS
 2A7A12003IPS ABSKKS
 2A7A12004Primer & CleanerKKS
 2A8A16001Simona Pressure PipeFKS
 2A8A16002Simona Butt fusion fFKS
 2A8A16003Simona Socket fusionFKS
 2A8A16004Special Pipe FittingFKS
 2A8A16005Liner PipesFKS
 2A8A16900Simona RawmaterialFKS
 2C1C00001CPC not all. generalDistribution Systems
 2C1C11001CPC meter setsDistribution Systems
 2C1C12001CPC RisersDistribution Systems
PH61A2791insulationDiverse Trading
 2A7A12Cements & CleanerIPSKKS
 2A7A12Cements & CleanerIPSKKS
 2A7A12Cements & CleanerIPSKKS
 2A7A12Cements & CleanerIPSKKS
 2A8A16SimonaFKS
 2A8A16SimonaFKS
 2A8A16SimonaFKS
 2A8A16SimonaFKS
 2A8A16SimonaFKS
 2A8A16SimonaFKS
 2C1C00CPC not all. generalDistribution Systems
 2C1C11CPC meter setsDistribution Systems
 2C1C12CPC RisersDistribution Systems
PH31A2Floor HeatingDiverse Trading
 2A7Cements & CleanerIPSKKS
 2A7Cements & CleanerIPSKKS
 2A7Cements & CleanerIPSKKS
 2A7Cements & CleanerIPSKKS
 2A8SimonaFKS
 2A8SimonaFKS
 2A8SimonaFKS
 2A8SimonaFKS
 2A8SimonaFKS
 2A8SimonaFKS
 2C1CPCDistribution Systems
 2C1CPCDistribution Systems
 2C1CPCDistribution Systems

 

 

 

1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

Not sure a crosstable would work as you have multiple column headers to reference

I would do it this way:

 

Data_temp:
Load * inline [
PH9, PH9_desc, PH6, PH6_desc, PH3, PH3_desc, Div_desc
1A2791001, insulation, 1A2791, insulation, 1A2, Floor Heating, Diverse Trading
2A7A12001, IPS UPVC, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12002, IPS CPVC, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12003, IPS ABS, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12004, Primer & Cleaner, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A8A16001, Simona Pressure Pipe, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16002, Simona Butt fusion f, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16003, Simona Socket fusion, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16004, Special Pipe Fitting, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16005, Liner Pipes, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16900, Simona Rawmaterial, 2A8A16, Simona, 2A8, Simona, FKS
2C1C00001, CPC not all. general, 2C1C00, CPC not all. general, 2C1, CPC, Distribution Systems
2C1C11001, CPC meter sets, 2C1C11, CPC meter sets, 2C1, CPC, Distribution Systems
2C1C12001, CPC Risers, 2C1C12, CPC Risers, 2C1, CPC, Distribution Systems
];

MainTable:
Load
'PH9' as PH_Name,
PH9 as PH_value,
PH9_desc as PH_Desc,
Div_desc
Resident Data_temp;
Load
'PH6' as PH_Name,
PH6 as PH_value,
PH6_desc as PH_Desc,
Div_desc
Resident Data_temp;
Load
'PH3' as PH_Name,
PH3 as PH_value,
PH3_desc as PH_Desc,
Div_desc
Resident Data_temp;

drop Table Data_temp;

View solution in original post

4 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi
Try using CrossTable while loading

Hope it helps
Thanks

Thanks and Regards
Kashyap.R
Nikhil2725
Creator II
Creator II
Author

Hi,

Can u please send the brief step in order to use CrossTable?

I mean with the script 

Thanks.

lorenzoconforti
Specialist II
Specialist II

Not sure a crosstable would work as you have multiple column headers to reference

I would do it this way:

 

Data_temp:
Load * inline [
PH9, PH9_desc, PH6, PH6_desc, PH3, PH3_desc, Div_desc
1A2791001, insulation, 1A2791, insulation, 1A2, Floor Heating, Diverse Trading
2A7A12001, IPS UPVC, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12002, IPS CPVC, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12003, IPS ABS, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A7A12004, Primer & Cleaner, 2A7A12, Cements & CleanerIPS, 2A7, Cements & CleanerIPS, KKS
2A8A16001, Simona Pressure Pipe, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16002, Simona Butt fusion f, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16003, Simona Socket fusion, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16004, Special Pipe Fitting, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16005, Liner Pipes, 2A8A16, Simona, 2A8, Simona, FKS
2A8A16900, Simona Rawmaterial, 2A8A16, Simona, 2A8, Simona, FKS
2C1C00001, CPC not all. general, 2C1C00, CPC not all. general, 2C1, CPC, Distribution Systems
2C1C11001, CPC meter sets, 2C1C11, CPC meter sets, 2C1, CPC, Distribution Systems
2C1C12001, CPC Risers, 2C1C12, CPC Risers, 2C1, CPC, Distribution Systems
];

MainTable:
Load
'PH9' as PH_Name,
PH9 as PH_value,
PH9_desc as PH_Desc,
Div_desc
Resident Data_temp;
Load
'PH6' as PH_Name,
PH6 as PH_value,
PH6_desc as PH_Desc,
Div_desc
Resident Data_temp;
Load
'PH3' as PH_Name,
PH3 as PH_value,
PH3_desc as PH_Desc,
Div_desc
Resident Data_temp;

drop Table Data_temp;

Nikhil2725
Creator II
Creator II
Author

Thanks for this code..

It worked actually what I wanted..

Cheers....