Hi, I'm using SQl Server 2005 and have the below table and SQL statement.
My pivot would be working nicely if I did not need to add the receipt number as well.
Every price is linked to a receipt number, and therefore the receipt number needed to show in a column after the price, not in individual rows.
I believe I have to do a 2nd pivot but cannot work out the SQL code on how to do this.
Any help is much appreciated.
SELECT location,fmtitemno as ItemNo,docnum as ReceiptNo, [1] AS Price1, [2] AS Price2, [3] AS Price3, [4] AS Price4
FROM (SELECT location,fmtitemno,docnum, averagecost, rk
FROM averagecost) co PIVOT (sum(averagecost) FOR rk IN ([1], [2], [3], [4])) AS pvt
ORDER BY location,fmtitemno
<html><head><title>Excel Jeanie HTML</title></head><body><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:71px;" /><col style="width:137px;" /><col style="width:117px;" /><col style="width:74px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Location</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ItemNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price4</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00014        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">1094</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">503.92667</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00047        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0001238            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">926.91</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-01035        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009002            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">2</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">47.895</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0008113            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">54.24667</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">38.375714</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">19.8272</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">6.845</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009063            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">22.77</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr></table> <br /><br /><span style="font-family:Arial; font-size:9pt; font-weight:bold;background-color:#ffffff; color:#000000; ">Excel tables to the web >> </span><a style ="font-family:Arial; font-size:9pt; color:#fcf507; background-color:#800040; font-weight:bold;" href=" target="_blank"> Excel Jeanie HTML 4 </a>
</body></html>
This is how my table should look like.
<html><head><title>Excel Jeanie HTML</title></head><body><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:71px;" /><col style="width:137px;" /><col style="width:74px;" /><col style="width:101px;" /><col style="width:64px;" /><col style="width:93px;" /><col style="width:76px;" /><col style="width:101px;" /><col style="width:63px;" /><col style="width:82px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Location</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ItemNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price4</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo4</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00014        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">503.92667</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">1094</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00047        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">926.91</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0001238            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-01035        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">2</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009002            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">47.895</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">54.2466667</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0008113            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">38.375714</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">19.8272</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">6.845</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">22.77</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009063            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr></table> <br /><br /><span style="font-family:Arial; font-size:9pt; font-weight:bold;background-color:#ffffff; color:#000000; ">Excel tables to the web >> </span><a style ="font-family:Arial; font-size:9pt; color:#fcf507; background-color:#800040; font-weight:bold;" href=" target="_blank"> Excel Jeanie HTML 4 </a>
</body></html>
My pivot would be working nicely if I did not need to add the receipt number as well.
Every price is linked to a receipt number, and therefore the receipt number needed to show in a column after the price, not in individual rows.
I believe I have to do a 2nd pivot but cannot work out the SQL code on how to do this.
Any help is much appreciated.
SELECT location,fmtitemno as ItemNo,docnum as ReceiptNo, [1] AS Price1, [2] AS Price2, [3] AS Price3, [4] AS Price4
FROM (SELECT location,fmtitemno,docnum, averagecost, rk
FROM averagecost) co PIVOT (sum(averagecost) FOR rk IN ([1], [2], [3], [4])) AS pvt
ORDER BY location,fmtitemno
<html><head><title>Excel Jeanie HTML</title></head><body><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:71px;" /><col style="width:137px;" /><col style="width:117px;" /><col style="width:74px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Location</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ItemNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price4</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00014        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">1094</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">503.92667</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00047        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0001238            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">926.91</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-01035        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009002            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">2</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">47.895</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0008113            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">54.24667</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">38.375714</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">19.8272</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">6.845</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009063            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">22.77</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td></tr></table> <br /><br /><span style="font-family:Arial; font-size:9pt; font-weight:bold;background-color:#ffffff; color:#000000; ">Excel tables to the web >> </span><a style ="font-family:Arial; font-size:9pt; color:#fcf507; background-color:#800040; font-weight:bold;" href=" target="_blank"> Excel Jeanie HTML 4 </a>
</body></html>
This is how my table should look like.
<html><head><title>Excel Jeanie HTML</title></head><body><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:71px;" /><col style="width:137px;" /><col style="width:74px;" /><col style="width:101px;" /><col style="width:64px;" /><col style="width:93px;" /><col style="width:76px;" /><col style="width:101px;" /><col style="width:63px;" /><col style="width:82px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Location</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ItemNo</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo1</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo2</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo3</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">Price4</td><td style="font-weight:bold; font-family:Arial; font-size:10pt; ">ReceiptNo4</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00014        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">503.92667</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">1094</td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-00047        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">926.91</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0001238            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-01035        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">2</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009002            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">47.895</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">54.2466667</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0008113            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02182        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">38.375714</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">19.8272</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0023502            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">6.845</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0016290            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td style="font-family:Arial; font-size:10pt; ">10GEI </td><td style="font-family:Arial; font-size:10pt; ">1-01-01-01-02183        </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td style="font-family:Arial; font-size:10pt; "> </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">22.77</td><td style="font-family:Arial; font-size:10pt; text-align:left; ">RCP0009063            </td><td style="font-family:Arial; font-size:10pt; text-align:right; ">NULL</td><td > </td></tr></table> <br /><br /><span style="font-family:Arial; font-size:9pt; font-weight:bold;background-color:#ffffff; color:#000000; ">Excel tables to the web >> </span><a style ="font-family:Arial; font-size:9pt; color:#fcf507; background-color:#800040; font-weight:bold;" href=" target="_blank"> Excel Jeanie HTML 4 </a>
</body></html>