How To Insert from CSV to Xml Bank Statment Data into Tables and Matching/Unmatching of Records.

ALTER PROCEDURE spImportBankStatement
(
@xmlStatements  NVARCHAR(MAX),
–declare @xmlStatements as NVARCHAR(MAX)
–set @xmlStatements=N'<DocumentElement>  <BankStatements>    <TransDate>2014-04-01T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PATHMEADS HSG GNRL</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1928.34</TransCredit>    <TransBalance>52898.63</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>BANK OF SCOTLAND . A/32512624-9</TransDescription>    <TransDebit>247.2</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>52651.43</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>C&amp;G . 5000003469538500</TransDescription>    <TransDebit>340.1</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>52311.33</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PALMER GF . NO REF . RP4671262632218100</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>52701.33</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ROSE SE . G I STACY . RP4671163082788400</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>60</TransCredit>    <TransBalance>52761.33</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>DOUGLAS R . 16A BURLEIGH PARAD . RP4679969725651800</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>150</TransCredit>    <TransBalance>52911.33</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-01T00:00:00+05:30</TransDate>    <TransType />    <TransAccount>61477868</TransAccount>    <TransDescription>INTEREST (NET)</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>18.03</TransCredit>    <TransBalance>52929.36</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-06T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PLUS- HISCOX . ISMAIO590/  1-U</TransDescription>    <TransDebit>69.63</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>52859.73</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-06T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2355</TransDescription>    <TransDebit>758.58</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>52101.15</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-07T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SCHUMANN T</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>52426.15</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-07T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SIMON J H FRASER</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>52816.15</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-07T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MR NICHOLAS RICHAR</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>710</TransCredit>    <TransBalance>53526.15</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-07T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NAGENDRAN R R T/</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>4666.67</TransCredit>    <TransBalance>58192.82</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-07T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>AXA INSURANCE . 719138A</TransDescription>    <TransDebit>1889.89</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>56302.93</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-12T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>K KOENTOPP</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>2100</TransCredit>    <TransBalance>58402.93</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-12T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WILLIAM ELSON</TransDescription>    <TransDebit>30</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>58372.93</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-12T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>4</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>58697.93</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-12T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>5</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>170</TransCredit>    <TransBalance>58867.93</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-12T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>6</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>149.31</TransCredit>    <TransBalance>59017.24</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-15T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>AL HAMRA FORT HOTE . AE         5809.20 . XR          5.4716 . CD 9922</TransDescription>    <TransDebit>1061.7</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57955.54</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-15T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>OVERSEAS TRANSACTI . CD 9922</TransDescription>    <TransDebit>1</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57954.54</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-15T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MIRACLE COFFEE SHO . CD 9922</TransDescription>    <TransDebit>47.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57907.04</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-16T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>7</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>58232.04</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-19T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>CRUZ LA5 1 . 46 BRUNSWICK</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>867</TransCredit>    <TransBalance>59099.04</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-19T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2359</TransDescription>    <TransDebit>253.46</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>58845.58</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-20T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PC WORLD . CD 9922</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>229</TransCredit>    <TransBalance>59074.58</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-20T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WWW.EASYSPACE.COM . CD 9922</TransDescription>    <TransDebit>135.13</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>58939.45</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-21T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ZEGAOULA M . DEPOSITMUS10A . 646050623461124001</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>543</TransCredit>    <TransBalance>59482.45</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-23T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>APCOA PARKING (UK) . CD 9922</TransDescription>    <TransDebit>6</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>59476.45</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-26T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>FIRST CAPITAL CONN . CD 9922</TransDescription>    <TransDebit>7.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>59468.95</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-26T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>O M ISMAIL</TransDescription>    <TransDebit>1601</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57867.95</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-26T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2358</TransDescription>    <TransDebit>290.23</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57577.72</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-26T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2361</TransDescription>    <TransDebit>2296.88</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>55280.84</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-26T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>8</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>40</TransCredit>    <TransBalance>55320.84</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WWW.BCF.NHS.UK . CD 9922</TransDescription>    <TransDebit>4</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>55316.84</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ASDA SUPERSTORE . CD 9922</TransDescription>    <TransDebit>6.88</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>55309.96</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TFL MFM . CD 9922</TransDescription>    <TransDebit>7.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>55302.46</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>DIXONS . CD 9922</TransDescription>    <TransDebit>149.99</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>55152.47</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-27T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>EN HICK . HICK . 002010042700129529</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>270</TransCredit>    <TransBalance>55422.47</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-28T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>VELASCO PETE</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>953.33</TransCredit>    <TransBalance>56375.8</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-28T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SKY DIGITAL . 00621050862583</TransDescription>    <TransDebit>47.48</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>56328.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-28T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NELSON M A . THE BROOKS 4 . 22023849446621000N</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1050</TransCredit>    <TransBalance>57378.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-29T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PEREIRA VA</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>270</TransCredit>    <TransBalance>57648.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-29T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2362</TransDescription>    <TransDebit>234</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>57414.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-29T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TERENCE CHARLES LE . TCL 16B BURLEIGH P . 64144530644301000N</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>899.4</TransCredit>    <TransBalance>58313.72</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-04-30T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>HIGH HOLBORN</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1958</TransCredit>    <TransBalance>60271.72</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MR SAM BIRCH</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>300</TransCredit>    <TransBalance>60571.72</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PATHMEADS HSG GNRL</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1928.34</TransCredit>    <TransBalance>62500.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TIMES SUBSCRIPTION . 1907573/0026302427</TransDescription>    <TransDebit>24</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>62476.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>BANK OF SCOTLAND . A/32512624-9</TransDescription>    <TransDebit>247.2</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>62228.86</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>C&amp;G . 5000003469538500</TransDescription>    <TransDebit>340.1</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>61888.76</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ROSE SE . G I STACY . RP4671163097542700</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>60</TransCredit>    <TransBalance>61948.76</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PALMER GF . NO REF . RP4671262645803500</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>62338.76</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-04T00:00:00+05:30</TransDate>    <TransType />    <TransAccount>61477868</TransAccount>    <TransDescription>INTEREST (NET)</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>23.56</TransCredit>    <TransBalance>62362.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-05T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ASDA SUPERSTORE . CD 9922</TransDescription>    <TransDebit>13</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>62349.32</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-05T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PLUS- HISCOX . ISMAIO590/  1-U</TransDescription>    <TransDebit>69.63</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>62279.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ZEGAOULA M</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>62604.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SCHUMANN T</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>62929.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SIMON J H FRASER</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>63319.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MR NICHOLAS RICHAR</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>710</TransCredit>    <TransBalance>64029.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NAGENDRAN R R T/</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>4666.67</TransCredit>    <TransBalance>68696.36</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-06T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2364</TransDescription>    <TransDebit>780</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>67916.36</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-07T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>FIRST CAPITAL CONN . CD 9922</TransDescription>    <TransDebit>14.8</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>67901.56</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-07T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>AXA INSURANCE . 719138A</TransDescription>    <TransDebit>1995.9</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>65905.66</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-10T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>CRUZ LA5 1 . 46 BRUNSWICK</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>867</TransCredit>    <TransBalance>66772.66</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-10T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WILLIAM ELSON</TransDescription>    <TransDebit>30</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>66742.66</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-10T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2367</TransDescription>    <TransDebit>117.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>66625.16</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-10T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2363</TransDescription>    <TransDebit>822.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>65802.66</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-11T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TFL MFM . CD 9922</TransDescription>    <TransDebit>15</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>65787.66</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-11T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2366</TransDescription>    <TransDebit>136.56</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>65651.1</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-12T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>K KOENTOPP</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>2100</TransCredit>    <TransBalance>67751.1</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-12T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2365</TransDescription>    <TransDebit>587.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>67163.6</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-17T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TOYS R US 3646 . CD 9922</TransDescription>    <TransDebit>153.98</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>67009.62</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-17T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>9</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>30</TransCredit>    <TransBalance>67039.62</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-17T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>10</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>8106.07</TransCredit>    <TransBalance>75145.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-17T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>11</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>75</TransCredit>    <TransBalance>75220.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-20T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SCREWFIX BOREHAMWO . CD 9922</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>7.15</TransCredit>    <TransBalance>75227.84</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-20T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SCREWFIX BOREHAMWO . CD 9922</TransDescription>    <TransDebit>15.23</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>75212.61</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-20T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WWWAMERICAN EXPRES . CD 9922</TransDescription>    <TransDebit>486.92</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>74725.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-20T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2369</TransDescription>    <TransDebit>1128</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>73597.69</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-20T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>12</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>150.36</TransCredit>    <TransBalance>73748.05</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-21T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2370</TransDescription>    <TransDebit>87.99</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>73660.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-21T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2360</TransDescription>    <TransDebit>120</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>73540.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-24T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MR LUIS M T COELHO . 2A LUIS . 34120244707840000N</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>750</TransCredit>    <TransBalance>74290.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>HOLLYWOOD BOWL FIN . CD 9922</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>11.25</TransCredit>    <TransBalance>74301.31</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>REGENCY RESTAURANT . CD 9922</TransDescription>    <TransDebit>16.8</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>74284.51</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>HOLLYWOOD BOWL FIN . CD 9922</TransDescription>    <TransDebit>52.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>74232.01</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>O M ISMAIL</TransDescription>    <TransDebit>1601</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>72631.01</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ORTIZ C . 10A ORTIZ . 121962459210525001</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>72956.01</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-25T00:00:00+05:30</TransDate>    <TransType>DEP</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>HIGH HOLBORN</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1958</TransCredit>    <TransBalance>74914.01</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-26T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PIZZA HUT 481 . CD 9922</TransDescription>    <TransDebit>77.58</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>74836.43</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-26T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2373</TransDescription>    <TransDebit>612.37</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>74224.06</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-26T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TERENCE CHARLES LE . TCL 16B BURLEIGH P . 61144616880119000N</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>899.4</TransCredit>    <TransBalance>75123.46</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>B&amp; Q . CD 9922</TransDescription>    <TransDebit>4.39</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>75119.07</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>THE PAINTBALL CENT . CD 9922</TransDescription>    <TransDebit>80</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>75039.07</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>VELASCO PETE</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>953.33</TransCredit>    <TransBalance>75992.4</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SKY DIGITAL . 00621050862583</TransDescription>    <TransDebit>43.89</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>75948.51</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2368</TransDescription>    <TransDebit>290.23</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>75658.28</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-27T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>EN HICK . HICK . 002010052700127270</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>300</TransCredit>    <TransBalance>75958.28</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-05-28T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NELSON M A . THE BROOKS 4 . 28024102946908000N</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1050</TransCredit>    <TransBalance>77008.28</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PEREIRA VA</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>300</TransCredit>    <TransBalance>77308.28</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>MR SAM BIRCH</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>300</TransCredit>    <TransBalance>77608.28</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PATHMEADS HSG GNRL</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>1928.34</TransCredit>    <TransBalance>79536.62</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TIMES SUBSCRIPTION . 1907573/002630241X</TransDescription>    <TransDebit>24</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79512.62</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PLUS- HISCOX . 1189253</TransDescription>    <TransDebit>87.11</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79425.51</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>BANK OF SCOTLAND . A/32512624-9</TransDescription>    <TransDebit>247.2</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79178.31</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>DD</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>C&amp;G . 5000003469538500</TransDescription>    <TransDebit>340.1</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>78838.21</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PALMER GF . NO REF . RP4671262658486800</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>79228.21</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NICHOLAS HUGHES . N HUGHES WD23 3HJ . 00151664632BBBBXCH</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>710</TransCredit>    <TransBalance>79938.21</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType>FPI</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ROSE SE . G I STACY . RP4671163112094800</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>60</TransCredit>    <TransBalance>79998.21</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-01T00:00:00+05:30</TransDate>    <TransType />    <TransAccount>61477868</TransAccount>    <TransDescription>INTEREST (NET)</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>20.82</TransCredit>    <TransBalance>80019.03</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-02T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>REGENCY RESTAURANT . CD 9922</TransDescription>    <TransDebit>25.4</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79993.63</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-02T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TESCO STORE 3050 . CD 9922</TransDescription>    <TransDebit>44.02</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79949.61</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-02T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>TESCO STORE 2126 . CD 9922</TransDescription>    <TransDebit>71.48</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79878.13</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-02T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2374</TransDescription>    <TransDebit>120</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79758.13</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>JACRO CINEMA SALES . CD 9922</TransDescription>    <TransDebit>48.88</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>79709.25</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ZEGAOULA M</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>80034.25</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SCHUMANN T</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>80359.25</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>SIMON J H FRASER</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>390</TransCredit>    <TransBalance>80749.25</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>NAGENDRAN R R T/</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>4666.67</TransCredit>    <TransBalance>85415.92</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-03T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2372</TransDescription>    <TransDebit>793.02</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>84622.9</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-07T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>PROTYRE ENFIELD . CD 9922</TransDescription>    <TransDebit>147.27</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>84475.63</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-07T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2375</TransDescription>    <TransDebit>179.78</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>84295.85</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-08T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>LA-VITA . CD 9922</TransDescription>    <TransDebit>231.8</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>84064.05</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-08T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>CRUZ LA5 1 . 46 BRUNSWICK</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>867</TransCredit>    <TransBalance>84931.05</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-08T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2377</TransDescription>    <TransDebit>775.5</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>84155.55</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-09T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2376</TransDescription>    <TransDebit>323.12</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>83832.43</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-10T00:00:00+05:30</TransDate>    <TransType>BGC</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>K KOENTOPP</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>2100</TransCredit>    <TransBalance>85932.43</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-10T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WILLIAM ELSON</TransDescription>    <TransDebit>30</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>85902.43</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-10T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2380</TransDescription>    <TransDebit>290.23</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>85612.2</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-11T00:00:00+05:30</TransDate>    <TransType>DEB</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>WYCOMBE DISTRICT COUNC . CD 9922</TransDescription>    <TransDebit>2</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>85610.2</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-11T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2382</TransDescription>    <TransDebit>183.46</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>85426.74</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-14T00:00:00+05:30</TransDate>    <TransType>SO</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>ORI H ORG F</TransDescription>    <TransDebit>0</TransDebit>    <TransCredit>325</TransCredit>    <TransBalance>85751.74</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-14T00:00:00+05:30</TransDate>    <TransType>CHQ</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>2379</TransDescription>    <TransDebit>1881</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>83870.74</TransBalance>  </BankStatements>  <BankStatements>    <TransDate>2010-06-14T00:00:00+05:30</TransDate>    <TransType>TFR</TransType>    <TransAccount>61477868</TransAccount>    <TransDescription>V DJEMAL</TransDescription>    <TransDebit>6000</TransDebit>    <TransCredit>0</TransCredit>    <TransBalance>77870.74</TransBalance>  </BankStatements></DocumentElement>’
–declare @message as NVARCHAR(MAX)
@message NVARCHAR(MAX) output
)
AS
BEGIN TRANSACTION
SET NOCOUNT ON;
BEGIN TRY
DECLARE @XMLDocPointer INT  
IF(@xmlStatements!=”)
        BEGIN    
        IF(OBJECT_ID(‘tempdb..#BankStatement’) Is Not NULL)
                        Begin
                        TRUNCATE TABLE #BankStatement
                        DROP TABLE #BankStatement
                        End

            
            EXEC sp_xml_preparedocument @XMLDocPointer OUTPUT, @xmlStatements
            SELECT TransDate,TransType,TransAccount ,TransDescription,TransDebit,TransCredit,TransBalance     INTO #BankStatement     
                FROM OPENXML(@XMLDocPointer,’/DocumentElement/BankStatements’,2)    
                WITH  (TransDate DATETIME,TransType NVARCHAR(MAX),TransAccount INT,TransDescription VARCHAR(max),
                TransDebit  DECIMAL(10,2),TransCredit DECIMAL(10,2),TransBalance DECIMAL(10,2))                            
                EXEC sp_xml_removedocument @XMLDocPointer
                    
                    ;WITH Ignored AS(
                                SELECT TransDate, TransType, TransDescription, TransDebit, TransCredit,TransBalance FROM #BankStatement
                                            INTERSECT
                                SELECT Date,ChqNo, Description,Debit,Credit,Balance FROM Transactions
                                )
                        SELECT * FROM Ignored                        
                    
                    ;WITH Added AS(
                                SELECT TransDate, TransType, TransDescription, TransDebit, TransCredit,TransBalance FROM #BankStatement
                                            EXCEPT
                                SELECT Date,ChqNo, Description,Debit,Credit,Balance FROM Transactions
                                )                    
                        SELECT *FROM Added

                        ;WITH Inserted AS(
                                SELECT TransDate, TransType, TransDescription, TransDebit, TransCredit,TransBalance FROM #BankStatement
                                            EXCEPT
                                SELECT Date,ChqNo, Description,Debit,Credit,Balance FROM Transactions
                                )                    
                        INSERT INTO Transactions(Date,ChqNo,Description,Debit,Credit,Balance)  SELECT TransDate,TransType,TransDescription,TransDebit,TransCredit,TransBalance  FROM Inserted
                        
                        IF(OBJECT_ID(‘tempdb..#BankStatement’) Is Not NULL)
                        Begin
                        TRUNCATE TABLE #BankStatement
                        DROP TABLE #BankStatement
                        End
        
        END
SET @message=’Done’
COMMIT    
END TRY
BEGIN CATCH
ROLLBACK
SET @message=ERROR_MESSAGE()
END CATCH

–TRUNCATE TABLE Transactions
–SELECT *FROM Transactions
–SELECT COUNT(*) FROM Transactions

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s