Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Could you please explain and give an example for CROSSTABLE Vs CrossTab in script.
Thanks in advance.
HI,
I never heard the CrossTab may be you are referring the CrossTable(), there is no keyword or function with name CrossTab.
When you want to unpivot the values then you have to use the CrossTable.
For example
Product, Jan-2015, Feb-2015, Mar-2015, Apr-2015
1,100, 120, 120, 125
2, 120, 90, 110, 115
The above is not suitable for reporting purposes so we need to transform this data to report suitable format, for this we need to use the CrossTable() like below
CrossTable(Month, Sales)
LOAD
*
FROM Sales;
The above script converts the data into below format
Product, Month, Sales
1, Jan-2015, 100
1, Feb-2015, 120
1, Mar-2015, 120
'
'
'
'
Hope this helps you.
Regards,
Jagan.
What do you mean with 'CrossTab'? Can you tell the context you have found this term?
I assume you think it's kind of a function name or statement?
Crosstab load
Thank you swuehl
HI,
I never heard the CrossTab may be you are referring the CrossTable(), there is no keyword or function with name CrossTab.
When you want to unpivot the values then you have to use the CrossTable.
For example
Product, Jan-2015, Feb-2015, Mar-2015, Apr-2015
1,100, 120, 120, 125
2, 120, 90, 110, 115
The above is not suitable for reporting purposes so we need to transform this data to report suitable format, for this we need to use the CrossTable() like below
CrossTable(Month, Sales)
LOAD
*
FROM Sales;
The above script converts the data into below format
Product, Month, Sales
1, Jan-2015, 100
1, Feb-2015, 120
1, Mar-2015, 120
'
'
'
'
Hope this helps you.
Regards,
Jagan.
Hi jagan
Thank you for the example.
nice explaination thanks.
Cross tab is a company