J
Jack
THe following shows sales for last year corresponding to a particular
customer for a particular salesperson
slsman SalesMonth Sum custnum Name
932 1 428030 171042 ABC HLTHCARE DIAG
932 2 369694 171042 ABC HLTHCARE DIAG
932 3 427864 171042 ABC HLTHCARE DIAG
932 4 464207 171042 ABC HLTHCARE DIAG
932 5 444013 171042 ABC HLTHCARE DIAG
932 6 494008 171042 ABC HLTHCARE DIAG
932 7 358036 171042 ABC HLTHCARE DIAG
932 8 234660 171042 ABC HLTHCARE DIAG
932 9 169884 171042 ABC HLTHCARE DIAG
932 10 202184 171042 ABC HLTHCARE DIAG
932 11 141299 171042 ABC HLTHCARE DIAG
932 12 264910 171042 ABC HLTHCARE DIAG
After doing a cross tab query in the above query I get the output of
crosstab as follows
slsman custnum Name GrandTotal Month01 Month02 Month03 Month04 Month05 Month06 Month07 Month08 Month09 Month10 Month11 Month12
932 171042 SIEMENS HLTHCARE
DIAG 3998789 428030 369694 427864 464207 444013 494008 358036 234660 169884 202184 141299 264910
Now i need to assing a unique number 1 to this output. 1 would represent
last years sales.
I am wondering if I need to create a temp table to do this. If there are
simpler approach I would like advise. Thanks.
customer for a particular salesperson
slsman SalesMonth Sum custnum Name
932 1 428030 171042 ABC HLTHCARE DIAG
932 2 369694 171042 ABC HLTHCARE DIAG
932 3 427864 171042 ABC HLTHCARE DIAG
932 4 464207 171042 ABC HLTHCARE DIAG
932 5 444013 171042 ABC HLTHCARE DIAG
932 6 494008 171042 ABC HLTHCARE DIAG
932 7 358036 171042 ABC HLTHCARE DIAG
932 8 234660 171042 ABC HLTHCARE DIAG
932 9 169884 171042 ABC HLTHCARE DIAG
932 10 202184 171042 ABC HLTHCARE DIAG
932 11 141299 171042 ABC HLTHCARE DIAG
932 12 264910 171042 ABC HLTHCARE DIAG
After doing a cross tab query in the above query I get the output of
crosstab as follows
slsman custnum Name GrandTotal Month01 Month02 Month03 Month04 Month05 Month06 Month07 Month08 Month09 Month10 Month11 Month12
932 171042 SIEMENS HLTHCARE
DIAG 3998789 428030 369694 427864 464207 444013 494008 358036 234660 169884 202184 141299 264910
Now i need to assing a unique number 1 to this output. 1 would represent
last years sales.
I am wondering if I need to create a temp table to do this. If there are
simpler approach I would like advise. Thanks.