column value balancing (copy previous value <> NULL)

  • Hi,

    I have the following table with data

    RowNum Cat Class Loc Date Owned Avail OnRent Return InShop OtherS

    111150102102009-04-0121018003

    211150102102009-04-02NULL0NULLNULLNULLNULL

    311150102102009-04-03NULLNULLNULLNULLNULLNULL

    411150102102009-04-04NULLNULLNULLNULLNULLNULL

    511150102102009-04-05NULLNULLNULLNULLNULLNULL

    611150102102009-04-06220180NULLNULL

    711150102102009-04-0721NULL161NULLNULL

    811150102102009-04-08NULLNULL152NULLNULL

    911150102102009-04-0920NULL14NULLNULLNULL

    1011150102102009-04-1022NULL126NULLNULL

    1111150102102009-04-11NULLNULLNULLNULLNULLNULL

    1211150102102009-04-12NULLNULLNULLNULLNULLNULL

    1311150102102009-04-13NULLNULLNULLNULLNULLNULL

    1411150102102009-04-14NULL1133NULL3

    1511150102102009-04-15NULL0132NULLNULL

    1611150102102009-04-16201NULL1NULLNULL

    1711150102102009-04-17NULLNULLNULLNULLNULLNULL

    1811150102102009-04-18NULLNULLNULLNULLNULLNULL

    1911150102102009-04-19NULLNULLNULLNULLNULLNULL

    2011150102102009-04-20NULL0102NULL5

    2111150102102009-04-2119NULLNULLNULLNULLNULL

    2211150102102009-04-22NULL0NULL003

    2311150102102009-04-2317NULLNULLNULLNULL1

    2411150102102009-04-24NULLNULLNULLNULLNULLNULL

    2511150102102009-04-25NULLNULLNULLNULLNULLNULL

    2611150102102009-04-26NULLNULLNULLNULLNULLNULL

    2711150102102009-04-27NULLNULL82NULLNULL

    2811150102102009-04-28NULLNULLNULLNULLNULLNULL

    2911150102102009-04-29NULL1NULL101

    3011150102102009-04-30NULLNULLNULLNULLNULLNULL

    3111150102102009-05-0116090NULLNULL

    3211150102102009-05-02NULLNULLNULLNULLNULLNULL

    3311150102102009-05-03NULLNULLNULLNULLNULLNULL

    3411150102102009-05-04NULLNULLNULLNULLNULLNULL

    3511150102102009-05-05NULLNULLNULLNULLNULLNULL

    3611150102102009-05-06NULLNULLNULLNULLNULLNULL

    3711150102102009-05-07NULLNULLNULLNULLNULLNULL

    3811150102102009-05-08NULLNULLNULLNULLNULLNULL

    3911150102102009-05-09NULLNULLNULLNULLNULLNULL

    4011150102102009-05-10NULLNULLNULLNULLNULLNULL

    4111150102102009-05-11NULLNULLNULLNULLNULLNULL

    4211150102102009-05-12NULLNULLNULLNULLNULLNULL

    4311150102102009-05-13NULLNULLNULLNULLNULLNULL

    4411150102102009-05-14NULLNULLNULLNULLNULLNULL

    4511150102102009-05-1513171NULL3

    4611150102102009-05-16NULLNULLNULLNULLNULLNULL

    4711150102102009-05-17NULLNULLNULLNULLNULLNULL

    4811150102102009-05-18NULL063NULLNULL

    4911150102102009-05-19122NULL1NULL2

    5011150102102009-05-20NULL270NULLNULL

    5111150102102009-05-21NULLNULLNULLNULLNULLNULL

    5211150102102009-05-22NULLNULLNULLNULLNULLNULL

    5311150102102009-05-23NULLNULLNULLNULLNULLNULL

    5411150102102009-05-24NULLNULLNULLNULLNULLNULL

    5511150102102009-05-25132611NULL

    5611150102102009-05-26NULLNULLNULLNULLNULLNULL

    5711150102102009-05-27NULL3NULL0NULLNULL

    5811150102102009-05-2814082NULL1

    5911150102102009-05-29131NULL1NULLNULL

    6011150102102009-05-30NULLNULLNULLNULLNULLNULL

    6111150102102009-05-31NULLNULLNULLNULLNULLNULL

    6211150102102009-06-01NULLNULLNULLNULLNULLNULL

    6311150102102009-06-02NULLNULLNULLNULLNULLNULL

    6411150102102009-06-03NULLNULLNULLNULLNULLNULL

    6511150102102009-06-04NULL0NULLNULLNULLNULL

    6611150102102009-06-0512NULLNULLNULLNULLNULL

    6711150102102009-06-06NULLNULLNULLNULLNULLNULL

    6811150102102009-06-07NULLNULLNULLNULLNULLNULL

    6911150102102009-06-08NULL090NULLNULL

    7011150102102009-06-0913010NULL1NULL

    7111150102102009-06-1014NULLNULLNULL02

    7211150102102009-06-11NULLNULLNULLNULLNULLNULL

    7311150102102009-06-12NULL0101NULL1

    7411150102102009-06-13NULLNULLNULLNULLNULLNULL

    7511150102102009-06-14NULLNULLNULLNULLNULLNULL

    7611150102102009-06-15142801NULL

    7711150102102009-06-16NULL07203

    7811150102102009-06-17NULL2NULL0NULLNULL

    7911150102102009-06-18NULL171NULLNULL

    8011150102102009-06-19NULL08NULLNULLNULL

    8111150102102009-06-20NULLNULLNULLNULLNULLNULL

    8211150102102009-06-21NULLNULLNULLNULLNULLNULL

    8311150102102009-06-22NULLNULLNULLNULLNULLNULL

    8411150102102009-06-2315NULLNULLNULLNULL4

    8511150102102009-06-24NULL1NULLNULLNULL3

    8611150102102009-06-25NULLNULLNULLNULLNULLNULL

    8711150102102009-06-261308NULL01

    8811150102102009-06-27NULLNULLNULLNULLNULLNULL

    8911150102102009-06-28NULLNULLNULLNULLNULLNULL

    9011150102102009-06-2913090NULLNULL

    9111150102102009-06-30NULL081NULLNULL

    9211150102102009-07-01NULLNULLNULL01NULL

    9311150102102009-07-0216NULLNULL22NULL

    9411150102102009-07-0318NULL635NULL

    9511150102102009-07-04NULLNULLNULLNULLNULLNULL

    9611150102102009-07-05NULLNULLNULLNULLNULLNULL

    9711150102102009-07-06NULL08NULL3NULL

    9811150102102009-07-07NULLNULLNULLNULLNULLNULL

    9911150102102009-07-0816NULLNULLNULLNULLNULL

    10011150102102009-07-09182NULLNULL31

    10111150102102009-07-10NULL110222

    10211150102102009-07-11NULLNULLNULLNULLNULLNULL

    10311150102102009-07-12NULLNULLNULLNULLNULLNULL

    10411150102102009-07-13NULLNULL93NULLNULL

    10511150102102009-07-14NULLNULL75NULLNULL

    10611150102102009-07-15NULLNULLNULL34NULL

    10711150102102009-07-16NULLNULL545NULL

    10811150102102009-07-17NULL1NULLNULL43

    10911150102102009-07-18NULLNULLNULLNULLNULLNULL

    11011150102102009-07-19NULLNULLNULLNULLNULLNULL

    11111150102102009-07-20NULLNULLNULLNULLNULLNULL

    11211150102102009-07-21NULL2NULLNULL3NULL

    11311150102102009-07-22193NULL-121

    11411150102102009-07-2315NULLNULLNULLNULLNULL

    11511150102102009-07-24112NULL0NULLNULL

    11611150102102009-07-25NULLNULLNULLNULLNULLNULL

    11711150102102009-07-26NULLNULLNULLNULLNULLNULL

    11811150102102009-07-2712NULLNULLNULLNULL2

    11911150102102009-07-28NULLNULLNULLNULLNULLNULL

    12011150102102009-07-29NULL0NULLNULL1NULL

    12111150102102009-07-30132NULLNULL02

    12211150102102009-07-31907NULLNULL1

    12311150102102009-08-01NULLNULLNULLNULLNULLNULL

    12411150102102009-08-02NULLNULLNULLNULLNULLNULL

    12511150102102009-08-0310NULL6012

    12611150102102009-08-04NULLNULLNULLNULLNULLNULL

    12711150102102009-08-05NULL1NULLNULLNULL1

    12811150102102009-08-06NULL07NULLNULLNULL

    12911150102102009-08-07NULLNULLNULLNULLNULLNULL

    13011150102102009-08-08NULLNULLNULLNULLNULLNULL

    13111150102102009-08-09NULLNULLNULLNULLNULLNULL

    13211150102102009-08-10NULLNULL61NULLNULL

    13311150102102009-08-11NULLNULLNULLNULLNULLNULL

    13411150102102009-08-1212NULLNULLNULLNULL3

    13511150102102009-08-13141NULLNULL05

    13611150102102009-08-14NULL4NULLNULLNULL2

    13711150102102009-08-15NULLNULLNULLNULLNULLNULL

    13811150102102009-08-16NULLNULLNULLNULLNULLNULL

    13911150102102009-08-17NULL5NULL0NULLNULL

    14011150102102009-08-18NULL47NULLNULLNULL

    14111150102102009-08-19NULL38NULLNULLNULL

    14211150102102009-08-20NULLNULL71NULLNULL

    14311150102102009-08-21NULLNULLNULLNULLNULLNULL

    14411150102102009-08-22NULLNULLNULLNULLNULLNULL

    14511150102102009-08-23NULLNULLNULLNULLNULLNULL

    14611150102102009-08-24NULLNULLNULLNULLNULLNULL

    14711150102102009-08-25NULLNULLNULLNULLNULLNULL

    14811150102102009-08-26NULL262NULLNULL

    14911150102102009-08-2713NULLNULL11NULL

    15011150102102009-08-28NULLNULLNULLNULLNULLNULL

    15111150102102009-08-29NULLNULLNULLNULLNULLNULL

    15211150102102009-08-30NULLNULLNULLNULLNULLNULL

    15311150102102009-08-31NULL162NULLNULL

    15411150102102009-09-01NULLNULL53NULLNULL

    15511150102102009-09-02NULL26121

    15611150102102009-09-03NULL162NULLNULL

    15711150102102009-09-04NULL1811NULL

    15811150102102009-09-05NULLNULLNULLNULLNULLNULL

    15911150102102009-09-06NULLNULLNULLNULLNULLNULL

    16011150102102009-09-07NULLNULLNULLNULLNULLNULL

    16111150102102009-09-08NULL082NULLNULL

    16211150102102009-09-0915084NULLNULL

    16311150102102009-09-10NULLNULLNULL23NULL

    16411150102102009-09-11NULL01012NULL

    16511150102102009-09-12NULLNULLNULLNULLNULLNULL

    16611150102102009-09-13NULLNULLNULLNULLNULLNULL

    16711150102102009-09-14NULLNULL92NULLNULL

    16811150102102009-09-15NULL011NULL10

    16911150102102009-09-16161103NULLNULL

    17011150102102009-09-17NULLNULLNULLNULLNULLNULL

    17111150102102009-09-18NULLNULL94NULLNULL

    17211150102102009-09-19NULLNULLNULLNULLNULLNULL

    17311150102102009-09-20NULLNULLNULLNULLNULLNULL

    17411150102102009-09-21NULLNULLNULLNULLNULLNULL

    17511150102102009-09-221748211

    17611150102102009-09-23NULL292NULLNULL

    17711150102102009-09-24152NULL102

    17811150102102009-09-2516291NULL3

    17911150102102009-09-26NULLNULLNULLNULLNULLNULL

    18011150102102009-09-27NULLNULLNULLNULLNULLNULL

    18111150102102009-09-28NULLNULL82NULLNULL

    18211150102102009-09-29151NULLNULLNULLNULL

    18311150102102009-09-30NULLNULLNULL1NULL2

    18411150102102009-10-0113NULLNULLNULLNULLNULL

    18511150102102009-10-02NULL09NULLNULLNULL

    18611150102102009-10-03NULLNULLNULLNULLNULLNULL

    18711150102102009-10-04NULLNULLNULLNULLNULLNULL

    18811150102102009-10-05NULL1NULL0NULLNULL

    18911150102102009-10-06NULL010NULLNULLNULL

    19011150102102009-10-07NULLNULLNULLNULLNULLNULL

    19111150102102009-10-08NULLNULL91NULLNULL

    19211150102102009-10-09NULLNULLNULLNULLNULLNULL

    19311150102102009-10-10NULLNULLNULLNULLNULLNULL

    19411150102102009-10-11NULLNULLNULLNULLNULLNULL

    19511150102102009-10-12NULLNULLNULLNULLNULLNULL

    19611150102102009-10-13NULLNULLNULLNULLNULLNULL

    19711150102102009-10-14NULLNULLNULLNULLNULLNULL

    19811150102102009-10-15NULL1NULL0NULLNULL

    19911150102102009-10-16NULLNULLNULLNULLNULLNULL

    20011150102102009-10-17NULL010NULLNULLNULL

    20111150102102009-10-18NULLNULLNULLNULLNULLNULL

    20211150102102009-10-1918190NULL7

    20311150102102009-10-20NULL2NULLNULLNULL6

    20411150102102009-10-21NULLNULLNULLNULLNULLNULL

    20511150102102009-10-22NULL010NULLNULL7

    20611150102102009-10-23NULLNULLNULLNULLNULLNULL

    20711150102102009-10-24NULLNULLNULLNULLNULLNULL

    20811150102102009-10-25NULLNULLNULLNULLNULLNULL

    20911150102102009-10-26NULLNULL91NULLNULL

    21011150102102009-10-27180NULL01NULL

    21111150102102009-10-28200NULLNULL3NULL

    21211150102102009-10-29NULL1NULLNULL2NULL

    21311150102102009-10-30NULLNULLNULLNULLNULLNULL

    21411150102102009-10-31NULLNULLNULLNULLNULLNULL

    21511150102102009-11-01NULLNULLNULLNULLNULLNULL

    21611150102102009-11-02NULLNULLNULLNULLNULLNULL

    21711150102102009-11-0321NULLNULL1NULLNULL

    21811150102102009-11-04NULLNULLNULLNULLNULLNULL

    21911150102102009-11-05220102NULLNULL

    22011150102102009-11-0623NULL11NULLNULLNULL

    22111150102102009-11-07NULLNULLNULLNULLNULLNULL

    22211150102102009-11-08NULLNULLNULLNULLNULLNULL

    22311150102102009-11-0924NULLNULLNULL3NULL

    22411150102102009-11-10NULL01312NULL

    22511150102102009-11-11NULLNULL122NULLNULL

    22611150102102009-11-1226NULLNULLNULL4NULL

    22711150102102009-11-13NULL1NULLNULL3NULL

    22811150102102009-11-14NULLNULLNULLNULLNULLNULL

    22911150102102009-11-15NULLNULLNULLNULLNULLNULL

    23011150102102009-11-16280134NULLNULL

    23111150102102009-11-17NULL114228

    23211150102102009-11-18NULL015NULLNULLNULL

    23311150102102009-11-19NULLNULL143NULLNULL

    23411150102102009-11-20NULL017217

    23511150102102009-11-21NULLNULLNULLNULLNULLNULL

    23611150102102009-11-22NULLNULLNULLNULLNULLNULL

    23711150102102009-11-2329215425

    23811150102102009-11-24NULL2154NULLNULL

    23911150102102009-11-2529014414

    24011150102102009-11-262521340NULL

    24111150102102009-11-27NULL3123NULLNULL

    24211150102102009-11-28NULLNULLNULLNULLNULLNULL

    24311150102102009-11-29NULLNULLNULLNULLNULLNULL

    24411150102102009-11-30243114NULLNULL

    24511150102102009-12-01231114NULLNULL

    24611150102102009-12-02NULL2NULL3NULLNULL

    24711150102102009-12-03NULL5NULL00NULL

    24811150102102009-12-04NULLNULL101NULLNULL

    24911150102102009-12-05NULLNULLNULLNULLNULLNULL

    25011150102102009-12-06NULLNULLNULLNULLNULLNULL

    25111150102102009-12-07224NULLNULLNULLNULL

    25211150102102009-12-08NULL211NULLNULLNULL

    25311150102102009-12-09NULL1NULLNULLNULLNULL

    25411150102102009-12-1020NULL102NULLNULL

    25511150102102009-12-11NULL1111NULLNULL

    25611150102102009-12-12NULLNULLNULLNULLNULLNULL

    25711150102102009-12-13NULLNULLNULLNULLNULLNULL

    25811150102102009-12-14NULL481NULLNULL

    25911150102102009-12-15NULLNULLNULLNULLNULLNULL

    26011150102102009-12-16NULL3100NULLNULL

    26111150102102009-12-17NULLNULLNULLNULLNULLNULL

    26211150102102009-12-1821NULL92NULLNULL

    26311150102102009-12-19NULLNULLNULLNULLNULLNULL

    26411150102102009-12-20NULLNULLNULLNULLNULLNULL

    26511150102102009-12-21NULL2921NULL

    26611150102102009-12-22201NULLNULL0NULL

    26711150102102009-12-23193NULL0NULLNULL

    26811150102102009-12-24NULLNULLNULLNULLNULLNULL

    26911150102102009-12-25NULLNULLNULLNULLNULLNULL

    27011150102102009-12-26NULLNULLNULLNULLNULLNULL

    27111150102102009-12-27NULLNULLNULLNULLNULLNULL

    27211150102102009-12-28NULL210NULLNULLNULL

    27311150102102009-12-29NULL0111NULLNULL

    27411150102102009-12-30212120NULLNULL

    27511150102102009-12-31NULLNULL111NULLNULL

    27611150102102010-01-01NULLNULLNULLNULLNULLNULL

    27711150102102010-01-02NULLNULLNULLNULLNULLNULL

    27811150102102010-01-03NULLNULLNULLNULLNULLNULL

    27911150102102010-01-04NULL1102NULL5

    28011150102102010-01-05222102NULLNULL

    28111150102102010-01-06NULL111NULLNULLNULL

    28211150102102010-01-07NULL012NULLNULLNULL

    28311150102102010-01-08221NULLNULL14

    28411150102102010-01-09NULLNULLNULLNULLNULLNULL

    28511150102102010-01-10NULLNULLNULLNULLNULLNULL

    28611150102102010-01-11NULL01321NULL

    28711150102102010-01-12NULL1123NULLNULL

    28811150102102010-01-13NULL21302NULL

    28911150102102010-01-1425314NULL3NULL

    29011150102102010-01-152641412NULL

    29111150102102010-01-16NULLNULLNULLNULLNULLNULL

    29211150102102010-01-17NULLNULLNULLNULLNULLNULL

    29311150102102010-01-182741113NULL

    29411150102102010-01-1924211145

    29511150102102010-01-20255NULL12NULL

    29611150102102010-01-2125611114

    29711150102102010-01-2223410115

    29811150102102010-01-23NULLNULLNULLNULLNULLNULL

    29911150102102010-01-24NULLNULLNULLNULLNULLNULL

    30011150102102010-01-25NULL5110NULL4

    30111150102102010-01-26224NULL0NULLNULL

    30211150102102010-01-27231141NULLNULL

    30311150102102010-01-28NULLNULLNULL02NULL

    30411150102102010-01-29241NULLNULLNULL5

    30511150102102010-01-30NULLNULLNULLNULLNULLNULL

    30611150102102010-01-31NULLNULLNULLNULLNULLNULL

    30711150102102010-02-01NULL015NULLNULLNULL

    30811150102102010-02-0226NULL141NULL7

    30911150102102010-02-0326110418

    31011150102102010-02-04NULL111237

    31111150102102010-02-05NULLNULL103NULLNULL

    31211150102102010-02-06NULLNULLNULLNULLNULLNULL

    31311150102102010-02-07NULLNULLNULLNULLNULLNULL

    31411150102102010-02-08250103NULLNULL

    31511150102102010-02-09NULL21021NULL

    31611150102102010-02-10241102NULL6

    31711150102102010-02-1122193NULL5

    31811150102102010-02-122101013NULL

    31911150102102010-02-13NULLNULLNULLNULLNULLNULL

    32011150102102010-02-14NULLNULLNULLNULLNULLNULL

    32111150102102010-02-152129026

    32211150102102010-02-16NULL011NULLNULLNULL

    32311150102102010-02-17NULLNULLNULLNULLNULLNULL

    32411150102102010-02-18NULLNULLNULLNULLNULLNULL

    32511150102102010-02-19NULLNULLNULLNULLNULLNULL

    32611150102102010-02-20NULLNULLNULLNULLNULLNULL

    32711150102102010-02-21NULLNULLNULLNULLNULLNULL

    32811150102102010-02-2220NULL91NULLNULL

    32911150102102010-02-23NULL181NULLNULL

    33011150102102010-02-24190902NULL

    33111150102102010-02-25NULL181NULL5

    33211150102102010-02-26NULLNULLNULLNULLNULLNULL

    33311150102102010-02-27NULLNULLNULLNULLNULLNULL

    33411150102102010-02-28NULLNULLNULLNULLNULLNULL

    33511150102102010-03-01NULLNULL72NULLNULL

    33611150102102010-03-02NULL08NULLNULLNULL

    33711150102102010-03-03NULLNULLNULLNULLNULLNULL

    33811150102102010-03-04NULL09044

    33911150102102010-03-05NULLNULLNULLNULLNULLNULL

    34011150102102010-03-06NULLNULLNULLNULLNULLNULL

    34111150102102010-03-07NULLNULLNULLNULLNULLNULL

    34211150102102010-03-0818-1NULLNULLNULLNULL

    34311150102102010-03-09NULL0813NULL

    34411150102102010-03-10NULLNULLNULLNULLNULLNULL

    34511150102102010-03-11NULL1NULL03NULL

    34611150102102010-03-12NULLNULLNULLNULLNULLNULL

    34711150102102010-03-13NULLNULLNULLNULLNULLNULL

    34811150102102010-03-14NULLNULLNULLNULLNULLNULL

    34911150102102010-03-15NULLNULLNULLNULLNULLNULL

    35011150102102010-03-16NULL2703NULL

    35111150102102010-03-17171NULLNULLNULLNULL

    35211150102102010-03-1818NULLNULLNULL4NULL

    35311150102102010-03-19NULLNULLNULLNULLNULLNULL

    35411150102102010-03-20NULLNULLNULLNULLNULLNULL

    35511150102102010-03-21NULLNULLNULLNULLNULLNULL

    35611150102102010-03-22NULL08NULL25

    35711150102102010-03-23NULLNULLNULLNULLNULLNULL

    35811150102102010-03-2417NULLNULLNULLNULLNULL

    35911150102102010-03-25NULLNULLNULLNULLNULLNULL

    36011150102102010-03-26NULL0612NULL

    36111150102102010-03-27NULLNULLNULLNULLNULLNULL

    36211150102102010-03-28NULLNULLNULLNULLNULLNULL

    36311150102102010-03-2916NULLNULLNULLNULLNULL

    36411150102102010-03-30NULLNULL52NULLNULL

    36511150102102010-03-31NULL2NULL12NULL

    36611150102102010-04-01NULLNULLNULLNULLNULLNULL

    36711150102102010-04-02NULLNULLNULLNULLNULLNULL

    36811150102102010-04-03NULLNULLNULLNULLNULLNULL

    36911150102102010-04-04NULLNULLNULLNULLNULLNULL

    37011150102102010-04-05NULLNULLNULLNULLNULLNULL

    37111150102102010-04-06NULLNULLNULLNULLNULLNULL

    37211150102102010-04-07NULL2NULL0NULLNULL

    37311150102102010-04-08NULL0612NULL

    37411150102102010-04-0917050NULLNULL

    37511150102102010-04-10NULLNULLNULLNULLNULLNULL

    37611150102102010-04-11NULLNULLNULLNULLNULLNULL

    37711150102102010-04-12190NULLNULL2NULL

    37811150102102010-04-13NULLNULLNULLNULLNULLNULL

    37911150102102010-04-142306NULL3NULL

    38011150102102010-04-151708NULL2NULL

    38111150102102010-04-16NULLNULLNULLNULLNULLNULL

    38211150102102010-04-17NULLNULLNULLNULLNULLNULL

    38311150102102010-04-18NULLNULLNULLNULLNULLNULL

    38411150102102010-04-19NULLNULL71NULLNULL

    38511150102102010-04-20NULLNULL53NULLNULL

    38611150102102010-04-21NULLNULLNULLNULLNULLNULL

    38711150102102010-04-22161NULL2NULLNULL

    38811150102102010-04-23NULLNULLNULLNULLNULLNULL

    38911150102102010-04-24NULLNULLNULLNULLNULLNULL

    39011150102102010-04-25NULLNULLNULLNULLNULLNULL

    39111150102102010-04-26NULL2NULL03NULL

    39211150102102010-04-27175402NULL

    39311150102102010-04-28NULL3NULLNULLNULLNULL

    39411150102102010-04-291606NULLNULLNULL

    39511150102102010-04-30NULLNULLNULLNULLNULLNULL

    39611150102102010-05-01NULLNULLNULLNULLNULLNULL

    39711150102102010-05-02NULLNULLNULLNULLNULLNULL

    39811150102102010-05-0315051NULLNULL

    39911150102102010-05-04NULL1NULL034

    40011150102102010-05-05NULL16NULL06

    40111150102102010-05-06NULL2NULLNULLNULL5

    40211150102102010-05-07141NULLNULLNULLNULL

    40311150102102010-05-08NULLNULLNULLNULLNULLNULL

    40411150102102010-05-09NULLNULLNULLNULLNULLNULL

    40511150102102010-05-101417NULLNULL2

    40611150102102010-05-11NULLNULLNULLNULLNULLNULL

    40711150102102010-05-12162NULL01NULL

    40811150102102010-05-13NULLNULLNULLNULLNULLNULL

    40911150102102010-05-14NULL09NULL03

    41011150102102010-05-15NULLNULLNULLNULLNULLNULL

    41111150102102010-05-16NULLNULLNULLNULLNULLNULL

    41211150102102010-05-1715NULLNULLNULLNULLNULL

    41311150102102010-05-18NULLNULLNULLNULLNULLNULL

    41411150102102010-05-19NULLNULLNULLNULLNULLNULL

    41511150102102010-05-20160NULLNULL1NULL

    41611150102102010-05-21141NULLNULL0NULL

    41711150102102010-05-22NULLNULLNULLNULLNULLNULL

    41811150102102010-05-23NULLNULLNULLNULLNULLNULL

    41911150102102010-05-24NULLNULLNULLNULLNULLNULL

    42011150102102010-05-25NULL010NULLNULLNULL

    42111150102102010-05-26NULLNULL91NULLNULL

    42211150102102010-05-27150NULL02NULL

    42311150102102010-05-2814010NULL12

    42411150102102010-05-29NULLNULLNULLNULLNULLNULL

    42511150102102010-05-30NULLNULLNULLNULLNULLNULL

    42611150102102010-05-31NULL1NULLNULL0NULL

    42711150102102010-06-0113081NULL3

    42811150102102010-06-02NULL18002

    42911150102102010-06-0315NULL73NULLNULL

    43011150102102010-06-04172714NULL

    43111150102102010-06-05NULLNULLNULLNULLNULLNULL

    43211150102102010-06-06NULLNULLNULLNULLNULLNULL

    43311150102102010-06-07NULL280NULLNULL

    43411150102102010-06-08173803NULL

    43511150102102010-06-09162NULLNULL2NULL

    43611150102102010-06-10153NULLNULL1NULL

    43711150102102010-06-11NULLNULLNULLNULLNULLNULL

    43811150102102010-06-12NULLNULLNULLNULLNULLNULL

    43911150102102010-06-13NULLNULLNULLNULLNULLNULL

    44011150102102010-06-14NULL271NULLNULL

    44111150102102010-06-1515092NULLNULL

    44211150102102010-06-16163NULL01NULL

    44311150102102010-06-17NULL39003

    44411150102102010-06-18NULL480NULL3

    44511150102102010-06-19NULLNULLNULLNULLNULLNULL

    44611150102102010-06-20NULLNULLNULLNULLNULLNULL

    44711150102102010-06-21NULL280NULLNULL

    44811150102102010-06-22NULL19NULLNULLNULL

    44911150102102010-06-2314090NULL4

    45011150102102010-06-24NULLNULLNULLNULLNULLNULL

    45111150102102010-06-25NULLNULLNULLNULLNULLNULL

    45211150102102010-06-26NULLNULLNULLNULLNULLNULL

    45311150102102010-06-27NULLNULLNULLNULLNULLNULL

    45411150102102010-06-28NULLNULLNULLNULLNULLNULL

    45511150102102010-06-2915271NULLNULL

    45611150102102010-06-30NULL070NULLNULL

    45711150102102010-07-0113070NULLNULL

    45811150102102010-07-0212NULLNULLNULLNULLNULL

    45911150102102010-07-03NULLNULLNULLNULLNULLNULL

    46011150102102010-07-04NULLNULLNULLNULLNULLNULL

    46111150102102010-07-05NULLNULLNULLNULLNULLNULL

    46211150102102010-07-06NULL051NULLNULL

    46311150102102010-07-0711060NULLNULL

    46411150102102010-07-08NULLNULLNULLNULLNULLNULL

    46511150102102010-07-09NULL1NULLNULLNULL3

    46611150102102010-07-10NULLNULLNULLNULLNULLNULL

    46711150102102010-07-11NULLNULLNULLNULLNULLNULL

    46811150102102010-07-12NULLNULLNULLNULLNULLNULL

    46911150102102010-07-13NULLNULLNULLNULLNULLNULL

    47011150102102010-07-14NULLNULLNULLNULLNULLNULL

    47111150102102010-07-15NULL08NULLNULL2

    47211150102102010-07-16NULL170NULLNULL

    47311150102102010-07-17NULLNULLNULLNULLNULLNULL

    47411150102102010-07-18NULLNULLNULLNULLNULLNULL

    47511150102102010-07-19NULLNULLNULLNULLNULLNULL

    47611150102102010-07-20NULLNULLNULLNULLNULLNULL

    47711150102102010-07-21NULLNULLNULLNULLNULLNULL

    47811150102102010-07-22NULL08NULLNULLNULL

    47911150102102010-07-23NULLNULL701NULL

    48011150102102010-07-24NULLNULLNULLNULLNULLNULL

    48111150102102010-07-25NULLNULLNULLNULLNULLNULL

    48211150102102010-07-26NULLNULLNULLNULLNULLNULL

    48311150102102010-07-27NULLNULLNULLNULLNULLNULL

    48411150102102010-07-28100NULLNULLNULLNULL

    48511150102102010-07-29NULLNULLNULLNULLNULLNULL

    48611150102102010-07-30NULLNULL61NULLNULL

    48711150102102010-07-31NULLNULLNULLNULLNULLNULL

    48811150102102010-08-01NULLNULLNULLNULLNULLNULL

    48911150102102010-08-02NULL1NULLNULL0NULL

    49011150102102010-08-03NULL0700NULL

    49111150102102010-08-04101NULLNULL0NULL

    49211150102102010-08-05NULLNULLNULLNULLNULLNULL

    49311150102102010-08-06NULL0NULLNULLNULLNULL

    49411150102102010-08-07NULLNULLNULLNULLNULLNULL

    49511150102102010-08-08NULLNULLNULLNULLNULLNULL

    49611150102102010-08-09NULLNULLNULLNULLNULLNULL

    49711150102102010-08-109NULL601NULL

    49811150102102010-08-11NULL07NULL0NULL

    49911150102102010-08-12806011

    50011150102102010-08-13NULLNULLNULLNULLNULLNULL

    50111150102102010-08-14NULLNULLNULLNULLNULLNULL

    50211150102102010-08-15NULLNULLNULLNULLNULLNULL

    50311150102102010-08-16NULLNULLNULLNULLNULLNULL

    50411150102102010-08-17NULLNULLNULLNULLNULLNULL

    50511150102102010-08-18NULLNULLNULLNULLNULLNULL

    50611150102102010-08-19NULLNULLNULLNULLNULLNULL

    50711150102102010-08-20NULLNULLNULLNULLNULLNULL

    50811150102102010-08-21NULLNULLNULLNULLNULLNULL

    50911150102102010-08-22NULLNULLNULLNULLNULLNULL

    51011150102102010-08-23NULLNULLNULLNULLNULLNULL

    51111150102102010-08-24NULLNULLNULLNULLNULLNULL

    51211150102102010-08-25NULLNULLNULLNULLNULLNULL

    51311150102102010-08-26NULL0NULLNULL0NULL

    51411150102102010-08-277NULL51NULLNULL

    51511150102102010-08-28NULLNULLNULLNULLNULLNULL

    51611150102102010-08-29NULLNULLNULLNULLNULLNULL

    51711150102102010-08-30NULLNULLNULLNULLNULLNULL

    51811150102102010-08-31NULL1NULLNULLNULL0

    51911150102102010-09-0161NULL0NULLNULL

    52011150102102010-09-02NULL0NULLNULLNULLNULL

    52111150102102010-09-035NULLNULLNULLNULLNULL

    52211150102102010-09-04NULLNULLNULLNULLNULLNULL

    52311150102102010-09-05NULLNULLNULLNULLNULLNULL

    52411150102102010-09-06NULLNULLNULLNULLNULLNULL

    52511150102102010-09-07NULLNULLNULLNULLNULLNULL

    52611150102102010-09-0872NULLNULLNULLNULL

    52711150102102010-09-09808NULLNULLNULL

    52811150102102010-09-10NULLNULLNULLNULLNULLNULL

    52911150102102010-09-11NULLNULLNULLNULLNULLNULL

    53011150102102010-09-12NULLNULLNULLNULLNULLNULL

    53111150102102010-09-13NULLNULL70NULL1

    53211150102102010-09-14NULLNULLNULLNULLNULLNULL

    53311150102102010-09-15NULLNULLNULLNULLNULLNULL

    53411150102102010-09-16NULLNULLNULLNULLNULLNULL

    53511150102102010-09-17NULLNULLNULLNULLNULLNULL

    53611150102102010-09-18NULLNULLNULLNULLNULLNULL

    53711150102102010-09-19NULLNULLNULLNULLNULLNULL

    53811150102102010-09-20NULLNULLNULLNULLNULLNULL

    53911150102102010-09-21NULL340NULLNULL

    54011150102102010-09-22605NULLNULLNULL

    54111150102102010-09-23NULLNULLNULLNULLNULLNULL

    54211150102102010-09-24706NULLNULLNULL

    54311150102102010-09-25NULLNULLNULLNULLNULLNULL

    54411150102102010-09-26NULLNULLNULLNULLNULLNULL

    54511150102102010-09-27NULL060NULLNULL

    54611150102102010-09-28NULLNULLNULLNULLNULLNULL

    54711150102102010-09-29NULLNULLNULLNULLNULLNULL

    54811150102102010-09-30NULL051NULLNULL

    54911150102102010-10-01NULL1NULL00NULL

    55011150102102010-10-02NULLNULLNULLNULLNULLNULL

    55111150102102010-10-03NULLNULLNULLNULLNULLNULL

    55211150102102010-10-04816NULLNULLNULL

    55311150102102010-10-05816NULL10

    55411150102102010-10-06815011

    55511150102102010-10-07NULLNULLNULLNULLNULLNULL

    55611150102102010-10-08NULL16NULL0NULL

    55711150102102010-10-09NULLNULLNULLNULLNULLNULL

    55811150102102010-10-10NULLNULLNULLNULLNULLNULL

    55911150102102010-10-11NULL160NULLNULL

    56011150102102010-10-12NULLNULLNULLNULLNULLNULL

    56111150102102010-10-13NULLNULLNULLNULLNULLNULL

    56211150102102010-10-14NULLNULLNULLNULLNULLNULL

    56311150102102010-10-15NULLNULLNULLNULLNULLNULL

    56411150102102010-10-16NULLNULLNULLNULLNULLNULL

    56511150102102010-10-17NULLNULLNULLNULLNULLNULL

    56611150102102010-10-18NULLNULLNULLNULLNULLNULL

    56711150102102010-10-1970NULLNULLNULLNULL

    56811150102102010-10-20NULLNULLNULLNULLNULLNULL

    56911150102102010-10-21NULLNULLNULLNULLNULLNULL

    57011150102102010-10-22NULLNULLNULLNULLNULLNULL

    57111150102102010-10-23NULLNULLNULLNULLNULLNULL

    57211150102102010-10-24NULLNULLNULLNULLNULLNULL

    57311150102102010-10-25NULLNULLNULLNULLNULLNULL

    57411150102102010-10-2681NULLNULLNULLNULL

    57511150102102010-10-2771NULLNULL00

    57611150102102010-10-28NULL07NULLNULLNULL

    57711150102102010-10-29NULLNULLNULLNULLNULLNULL

    57811150102102010-10-30NULLNULLNULLNULLNULLNULL

    57911150102102010-10-31NULLNULLNULLNULLNULLNULL

    58011150102102010-11-01NULLNULLNULLNULLNULLNULL

    58111150102102010-11-02NULLNULLNULLNULLNULLNULL

    58211150102102010-11-037NULL61NULLNULL

    58311150102102010-11-0481NULL01NULL

    58411150102102010-11-05807NULL0NULL

    58511150102102010-11-06NULLNULLNULLNULLNULLNULL

    58611150102102010-11-07NULLNULLNULLNULLNULLNULL

    58711150102102010-11-087NULLNULLNULLNULLNULL

    58811150102102010-11-097NULL6NULL1NULL

    58911150102102010-11-10NULL060NULLNULL

    59011150102102010-11-11NULLNULLNULLNULLNULLNULL

    59111150102102010-11-12NULLNULLNULLNULLNULLNULL

    59211150102102010-11-13NULLNULLNULLNULLNULLNULL

    59311150102102010-11-14NULLNULLNULLNULLNULLNULL

    59411150102102010-11-15NULLNULLNULLNULLNULLNULL

    The first row (rownum=1) contains always values for columns Owned, Available,OnRent, Returned, Inshop and OtherShop

    I want to duplicate values starting from row 1 to bottom as follows:

    example for column Owned

    row 1 has value 21

    row 2 has value NULL so the value 21 has to be copied from row 1

    row 3 has value NULL so the value 21 has to be copied from row 1

    row 4 has value NULL so the value 21 has to be copied from row 1

    row 5 has value NULL so the value 21 has to be copied from row 1

    row 6 has value 22 so nothing has to be copied because its value is not NULL

    row 7 has value 21 so nothing has to be copied because its value is not NULL

    row 8 has value NULL so the value 21 has to be copied from row 7

    row 9 has value 20 so nothing has to be copied because its value is not NULL

    row 10 has value 22 so nothing has to be copied because its value is not NULL

    row 11 has value NULL so the value 22 has to be copied from row 10

    and so on all the way to the bottom

    This must be done for the columns Owned, Available,OnRent, Returned, Inshop and OtherShop

    I have done this with a cursor but since the table is 26 million records it's to slow (calculated 60 hours to finish)

    How can i accomplish this without making use of a cursor or CTE (CTE is also far to slow) I want to do this with normal SQL

    Regards

    Dirk

  • This looks like a homework assignment. 😉

    Hint: it can be done in a single update statement with CASE.

    Actually... I may have slightly mis-read your post, Nonetheless, it can still be done in one update.... Hint: Join the table to itself. Still probably need to use CASE

    The probability of survival is inversely proportional to the angle of arrival.

  • If you want to put your data in a consulable format (DDL and DML). Then someone can write a single query that'll do the update.

  • Hi ,

    Wow , sounds too good to be true. Do you have an example , Please help

    Regards,

    Dirk

  • You might want to read the first article linked in my signature on how to post sample data.

    Please include the clustered index definition, since it's crucial to decide which option to go for.

    I'd use the quirky update method, if the table def meets all the requirements.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Dick Herberts-320552 (11/17/2010)


    Hi ,

    Wow , sounds too good to be true. Do you have an example , Please help

    Regards,

    Dirk

    @? Is your name Dick, or Dirk?

    Can you verify also:

    1. That you are using SQL 2008 (that's what forum you posted in)

    2. That this is not homework, or an interview or test question

    3. What columns make up the Primary Key?

    4. And, as Lutz asked, what is the definition of the clustered index on this table?

    @Lutz: concur with the QU - seems real straightforward. Even if CI is not correct, it would probably be faster to dump to temp table with proper CI, update temp table with QU, and then update real table from temp table.

    Thanks!

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (11/17/2010)


    Dick Herberts-320552 (11/17/2010)


    Hi ,

    Wow , sounds too good to be true. Do you have an example , Please help

    Regards,

    Dirk

    @? Is your name Dick, or Dirk?

    Can you verify also:

    1. That you are using SQL 2008 (that's what forum you posted in)

    2. That this is not homework, or an interview or test question

    3. What columns make up the Primary Key?

    4. And, as Lutz asked, what is the definition of the clustered index on this table?

    @Lutz: concur with the QU - seems real straightforward. Even if CI is not correct, it would probably be faster to dump to temp table with proper CI, update temp table with QU, and then update real table from temp table.

    Thanks!

    If possible, I'd try to avoid the temp table workaround, since we're talking about >20mill rows (not knowing how wide a row is though...)



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Hi ,

    1. I'am using SQL Server 2008 R2

    2. This is for real and not home work or whatever

    3. Primary key is Category,Class,Location,RowNum

    4. No clustered index yet

    Regards,

    Dick Herberts

    This is the script for creating the test table

    /****** Object: Table [dbo].[TestTable2] Script Date: 11/17/2010 19:34:27 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[TestTable2](

    [RowNum] [bigint] NULL,

    [Category] [varchar](3) NULL,

    [Class] [varchar](4) NULL,

    [Location] [varchar](3) NULL,

    [Datum] [date] NULL,

    [Owned] [int] NULL,

    [Beschikbaar] [int] NULL,

    [OnRent] [int] NULL,

    [Returned] [int] NULL,

    [InShop] [int] NULL,

    [OtherShop] [int] NULL

    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF

    GO

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (1, N'111', N'5010', N'210', CAST(0x39310B00 AS Date), 21, 0, 18, 0, 0, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (2, N'111', N'5010', N'210', CAST(0x3A310B00 AS Date), NULL, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (3, N'111', N'5010', N'210', CAST(0x3B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (4, N'111', N'5010', N'210', CAST(0x3C310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (5, N'111', N'5010', N'210', CAST(0x3D310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (6, N'111', N'5010', N'210', CAST(0x3E310B00 AS Date), 22, 0, 18, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (7, N'111', N'5010', N'210', CAST(0x3F310B00 AS Date), 21, NULL, 16, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (8, N'111', N'5010', N'210', CAST(0x40310B00 AS Date), NULL, NULL, 15, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (9, N'111', N'5010', N'210', CAST(0x41310B00 AS Date), 20, NULL, 14, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (10, N'111', N'5010', N'210', CAST(0x42310B00 AS Date), 22, NULL, 12, 6, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (11, N'111', N'5010', N'210', CAST(0x43310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (12, N'111', N'5010', N'210', CAST(0x44310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (13, N'111', N'5010', N'210', CAST(0x45310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (14, N'111', N'5010', N'210', CAST(0x46310B00 AS Date), NULL, 1, 13, 3, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (15, N'111', N'5010', N'210', CAST(0x47310B00 AS Date), NULL, 0, 13, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (16, N'111', N'5010', N'210', CAST(0x48310B00 AS Date), 20, 1, NULL, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (17, N'111', N'5010', N'210', CAST(0x49310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (18, N'111', N'5010', N'210', CAST(0x4A310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (19, N'111', N'5010', N'210', CAST(0x4B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (20, N'111', N'5010', N'210', CAST(0x4C310B00 AS Date), NULL, 0, 10, 2, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (21, N'111', N'5010', N'210', CAST(0x4D310B00 AS Date), 19, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (22, N'111', N'5010', N'210', CAST(0x4E310B00 AS Date), NULL, 0, NULL, 0, 0, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (23, N'111', N'5010', N'210', CAST(0x4F310B00 AS Date), 17, NULL, NULL, NULL, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (24, N'111', N'5010', N'210', CAST(0x50310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (25, N'111', N'5010', N'210', CAST(0x51310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (26, N'111', N'5010', N'210', CAST(0x52310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (27, N'111', N'5010', N'210', CAST(0x53310B00 AS Date), NULL, NULL, 8, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (28, N'111', N'5010', N'210', CAST(0x54310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (29, N'111', N'5010', N'210', CAST(0x55310B00 AS Date), NULL, 1, NULL, 1, 0, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (30, N'111', N'5010', N'210', CAST(0x56310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (31, N'111', N'5010', N'210', CAST(0x57310B00 AS Date), 16, 0, 9, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (32, N'111', N'5010', N'210', CAST(0x58310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (33, N'111', N'5010', N'210', CAST(0x59310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (34, N'111', N'5010', N'210', CAST(0x5A310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (35, N'111', N'5010', N'210', CAST(0x5B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (36, N'111', N'5010', N'210', CAST(0x5C310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (37, N'111', N'5010', N'210', CAST(0x5D310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (38, N'111', N'5010', N'210', CAST(0x5E310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (39, N'111', N'5010', N'210', CAST(0x5F310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (40, N'111', N'5010', N'210', CAST(0x60310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (41, N'111', N'5010', N'210', CAST(0x61310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (42, N'111', N'5010', N'210', CAST(0x62310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (43, N'111', N'5010', N'210', CAST(0x63310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (44, N'111', N'5010', N'210', CAST(0x64310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (45, N'111', N'5010', N'210', CAST(0x65310B00 AS Date), 13, 1, 7, 1, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (46, N'111', N'5010', N'210', CAST(0x66310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (47, N'111', N'5010', N'210', CAST(0x67310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (48, N'111', N'5010', N'210', CAST(0x68310B00 AS Date), NULL, 0, 6, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (49, N'111', N'5010', N'210', CAST(0x69310B00 AS Date), 12, 2, NULL, 1, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (50, N'111', N'5010', N'210', CAST(0x6A310B00 AS Date), NULL, 2, 7, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (51, N'111', N'5010', N'210', CAST(0x6B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (52, N'111', N'5010', N'210', CAST(0x6C310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (53, N'111', N'5010', N'210', CAST(0x6D310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (54, N'111', N'5010', N'210', CAST(0x6E310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (55, N'111', N'5010', N'210', CAST(0x6F310B00 AS Date), 13, 2, 6, 1, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (56, N'111', N'5010', N'210', CAST(0x70310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (57, N'111', N'5010', N'210', CAST(0x71310B00 AS Date), NULL, 3, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (58, N'111', N'5010', N'210', CAST(0x72310B00 AS Date), 14, 0, 8, 2, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (59, N'111', N'5010', N'210', CAST(0x73310B00 AS Date), 13, 1, NULL, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (60, N'111', N'5010', N'210', CAST(0x74310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (61, N'111', N'5010', N'210', CAST(0x75310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (62, N'111', N'5010', N'210', CAST(0x76310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (63, N'111', N'5010', N'210', CAST(0x77310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (64, N'111', N'5010', N'210', CAST(0x78310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (65, N'111', N'5010', N'210', CAST(0x79310B00 AS Date), NULL, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (66, N'111', N'5010', N'210', CAST(0x7A310B00 AS Date), 12, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (67, N'111', N'5010', N'210', CAST(0x7B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (68, N'111', N'5010', N'210', CAST(0x7C310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (69, N'111', N'5010', N'210', CAST(0x7D310B00 AS Date), NULL, 0, 9, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (70, N'111', N'5010', N'210', CAST(0x7E310B00 AS Date), 13, 0, 10, NULL, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (71, N'111', N'5010', N'210', CAST(0x7F310B00 AS Date), 14, NULL, NULL, NULL, 0, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (72, N'111', N'5010', N'210', CAST(0x80310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (73, N'111', N'5010', N'210', CAST(0x81310B00 AS Date), NULL, 0, 10, 1, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (74, N'111', N'5010', N'210', CAST(0x82310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (75, N'111', N'5010', N'210', CAST(0x83310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (76, N'111', N'5010', N'210', CAST(0x84310B00 AS Date), 14, 2, 8, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (77, N'111', N'5010', N'210', CAST(0x85310B00 AS Date), NULL, 0, 7, 2, 0, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (78, N'111', N'5010', N'210', CAST(0x86310B00 AS Date), NULL, 2, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (79, N'111', N'5010', N'210', CAST(0x87310B00 AS Date), NULL, 1, 7, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (80, N'111', N'5010', N'210', CAST(0x88310B00 AS Date), NULL, 0, 8, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (81, N'111', N'5010', N'210', CAST(0x89310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (82, N'111', N'5010', N'210', CAST(0x8A310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (83, N'111', N'5010', N'210', CAST(0x8B310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (84, N'111', N'5010', N'210', CAST(0x8C310B00 AS Date), 15, NULL, NULL, NULL, NULL, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (85, N'111', N'5010', N'210', CAST(0x8D310B00 AS Date), NULL, 1, NULL, NULL, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (86, N'111', N'5010', N'210', CAST(0x8E310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (87, N'111', N'5010', N'210', CAST(0x8F310B00 AS Date), 13, 0, 8, NULL, 0, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (88, N'111', N'5010', N'210', CAST(0x90310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (89, N'111', N'5010', N'210', CAST(0x91310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (90, N'111', N'5010', N'210', CAST(0x92310B00 AS Date), 13, 0, 9, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (91, N'111', N'5010', N'210', CAST(0x93310B00 AS Date), NULL, 0, 8, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (92, N'111', N'5010', N'210', CAST(0x94310B00 AS Date), NULL, NULL, NULL, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (93, N'111', N'5010', N'210', CAST(0x95310B00 AS Date), 16, NULL, NULL, 2, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (94, N'111', N'5010', N'210', CAST(0x96310B00 AS Date), 18, NULL, 6, 3, 5, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (95, N'111', N'5010', N'210', CAST(0x97310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (96, N'111', N'5010', N'210', CAST(0x98310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (97, N'111', N'5010', N'210', CAST(0x99310B00 AS Date), NULL, 0, 8, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (98, N'111', N'5010', N'210', CAST(0x9A310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (99, N'111', N'5010', N'210', CAST(0x9B310B00 AS Date), 16, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (100, N'111', N'5010', N'210', CAST(0x9C310B00 AS Date), 18, 2, NULL, NULL, 3, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (101, N'111', N'5010', N'210', CAST(0x9D310B00 AS Date), NULL, 1, 10, 2, 2, 2)

    GO

    print 'Processed 100 total records'

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (102, N'111', N'5010', N'210', CAST(0x9E310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (103, N'111', N'5010', N'210', CAST(0x9F310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (104, N'111', N'5010', N'210', CAST(0xA0310B00 AS Date), NULL, NULL, 9, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (105, N'111', N'5010', N'210', CAST(0xA1310B00 AS Date), NULL, NULL, 7, 5, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (106, N'111', N'5010', N'210', CAST(0xA2310B00 AS Date), NULL, NULL, NULL, 3, 4, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (107, N'111', N'5010', N'210', CAST(0xA3310B00 AS Date), NULL, NULL, 5, 4, 5, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (108, N'111', N'5010', N'210', CAST(0xA4310B00 AS Date), NULL, 1, NULL, NULL, 4, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (109, N'111', N'5010', N'210', CAST(0xA5310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (110, N'111', N'5010', N'210', CAST(0xA6310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (111, N'111', N'5010', N'210', CAST(0xA7310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (112, N'111', N'5010', N'210', CAST(0xA8310B00 AS Date), NULL, 2, NULL, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (113, N'111', N'5010', N'210', CAST(0xA9310B00 AS Date), 19, 3, NULL, -1, 2, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (114, N'111', N'5010', N'210', CAST(0xAA310B00 AS Date), 15, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (115, N'111', N'5010', N'210', CAST(0xAB310B00 AS Date), 11, 2, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (116, N'111', N'5010', N'210', CAST(0xAC310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (117, N'111', N'5010', N'210', CAST(0xAD310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (118, N'111', N'5010', N'210', CAST(0xAE310B00 AS Date), 12, NULL, NULL, NULL, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (119, N'111', N'5010', N'210', CAST(0xAF310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (120, N'111', N'5010', N'210', CAST(0xB0310B00 AS Date), NULL, 0, NULL, NULL, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (121, N'111', N'5010', N'210', CAST(0xB1310B00 AS Date), 13, 2, NULL, NULL, 0, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (122, N'111', N'5010', N'210', CAST(0xB2310B00 AS Date), 9, 0, 7, NULL, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (123, N'111', N'5010', N'210', CAST(0xB3310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (124, N'111', N'5010', N'210', CAST(0xB4310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (125, N'111', N'5010', N'210', CAST(0xB5310B00 AS Date), 10, NULL, 6, 0, 1, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (126, N'111', N'5010', N'210', CAST(0xB6310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (127, N'111', N'5010', N'210', CAST(0xB7310B00 AS Date), NULL, 1, NULL, NULL, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (128, N'111', N'5010', N'210', CAST(0xB8310B00 AS Date), NULL, 0, 7, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (129, N'111', N'5010', N'210', CAST(0xB9310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (130, N'111', N'5010', N'210', CAST(0xBA310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (131, N'111', N'5010', N'210', CAST(0xBB310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (132, N'111', N'5010', N'210', CAST(0xBC310B00 AS Date), NULL, NULL, 6, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (133, N'111', N'5010', N'210', CAST(0xBD310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (134, N'111', N'5010', N'210', CAST(0xBE310B00 AS Date), 12, NULL, NULL, NULL, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (135, N'111', N'5010', N'210', CAST(0xBF310B00 AS Date), 14, 1, NULL, NULL, 0, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (136, N'111', N'5010', N'210', CAST(0xC0310B00 AS Date), NULL, 4, NULL, NULL, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (137, N'111', N'5010', N'210', CAST(0xC1310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (138, N'111', N'5010', N'210', CAST(0xC2310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (139, N'111', N'5010', N'210', CAST(0xC3310B00 AS Date), NULL, 5, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (140, N'111', N'5010', N'210', CAST(0xC4310B00 AS Date), NULL, 4, 7, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (141, N'111', N'5010', N'210', CAST(0xC5310B00 AS Date), NULL, 3, 8, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (142, N'111', N'5010', N'210', CAST(0xC6310B00 AS Date), NULL, NULL, 7, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (143, N'111', N'5010', N'210', CAST(0xC7310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (144, N'111', N'5010', N'210', CAST(0xC8310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (145, N'111', N'5010', N'210', CAST(0xC9310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (146, N'111', N'5010', N'210', CAST(0xCA310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (147, N'111', N'5010', N'210', CAST(0xCB310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (148, N'111', N'5010', N'210', CAST(0xCC310B00 AS Date), NULL, 2, 6, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (149, N'111', N'5010', N'210', CAST(0xCD310B00 AS Date), 13, NULL, NULL, 1, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (150, N'111', N'5010', N'210', CAST(0xCE310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (151, N'111', N'5010', N'210', CAST(0xCF310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (152, N'111', N'5010', N'210', CAST(0xD0310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (153, N'111', N'5010', N'210', CAST(0xD1310B00 AS Date), NULL, 1, 6, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (154, N'111', N'5010', N'210', CAST(0xD2310B00 AS Date), NULL, NULL, 5, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (155, N'111', N'5010', N'210', CAST(0xD3310B00 AS Date), NULL, 2, 6, 1, 2, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (156, N'111', N'5010', N'210', CAST(0xD4310B00 AS Date), NULL, 1, 6, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (157, N'111', N'5010', N'210', CAST(0xD5310B00 AS Date), NULL, 1, 8, 1, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (158, N'111', N'5010', N'210', CAST(0xD6310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (159, N'111', N'5010', N'210', CAST(0xD7310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (160, N'111', N'5010', N'210', CAST(0xD8310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (161, N'111', N'5010', N'210', CAST(0xD9310B00 AS Date), NULL, 0, 8, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (162, N'111', N'5010', N'210', CAST(0xDA310B00 AS Date), 15, 0, 8, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (163, N'111', N'5010', N'210', CAST(0xDB310B00 AS Date), NULL, NULL, NULL, 2, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (164, N'111', N'5010', N'210', CAST(0xDC310B00 AS Date), NULL, 0, 10, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (165, N'111', N'5010', N'210', CAST(0xDD310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (166, N'111', N'5010', N'210', CAST(0xDE310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (167, N'111', N'5010', N'210', CAST(0xDF310B00 AS Date), NULL, NULL, 9, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (168, N'111', N'5010', N'210', CAST(0xE0310B00 AS Date), NULL, 0, 11, NULL, 1, 0)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (169, N'111', N'5010', N'210', CAST(0xE1310B00 AS Date), 16, 1, 10, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (170, N'111', N'5010', N'210', CAST(0xE2310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (171, N'111', N'5010', N'210', CAST(0xE3310B00 AS Date), NULL, NULL, 9, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (172, N'111', N'5010', N'210', CAST(0xE4310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (173, N'111', N'5010', N'210', CAST(0xE5310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (174, N'111', N'5010', N'210', CAST(0xE6310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (175, N'111', N'5010', N'210', CAST(0xE7310B00 AS Date), 17, 4, 8, 2, 1, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (176, N'111', N'5010', N'210', CAST(0xE8310B00 AS Date), NULL, 2, 9, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (177, N'111', N'5010', N'210', CAST(0xE9310B00 AS Date), 15, 2, NULL, 1, 0, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (178, N'111', N'5010', N'210', CAST(0xEA310B00 AS Date), 16, 2, 9, 1, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (179, N'111', N'5010', N'210', CAST(0xEB310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (180, N'111', N'5010', N'210', CAST(0xEC310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (181, N'111', N'5010', N'210', CAST(0xED310B00 AS Date), NULL, NULL, 8, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (182, N'111', N'5010', N'210', CAST(0xEE310B00 AS Date), 15, 1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (183, N'111', N'5010', N'210', CAST(0xEF310B00 AS Date), NULL, NULL, NULL, 1, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (184, N'111', N'5010', N'210', CAST(0xF0310B00 AS Date), 13, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (185, N'111', N'5010', N'210', CAST(0xF1310B00 AS Date), NULL, 0, 9, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (186, N'111', N'5010', N'210', CAST(0xF2310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (187, N'111', N'5010', N'210', CAST(0xF3310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (188, N'111', N'5010', N'210', CAST(0xF4310B00 AS Date), NULL, 1, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (189, N'111', N'5010', N'210', CAST(0xF5310B00 AS Date), NULL, 0, 10, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (190, N'111', N'5010', N'210', CAST(0xF6310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (191, N'111', N'5010', N'210', CAST(0xF7310B00 AS Date), NULL, NULL, 9, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (192, N'111', N'5010', N'210', CAST(0xF8310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (193, N'111', N'5010', N'210', CAST(0xF9310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (194, N'111', N'5010', N'210', CAST(0xFA310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (195, N'111', N'5010', N'210', CAST(0xFB310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (196, N'111', N'5010', N'210', CAST(0xFC310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (197, N'111', N'5010', N'210', CAST(0xFD310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (198, N'111', N'5010', N'210', CAST(0xFE310B00 AS Date), NULL, 1, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (199, N'111', N'5010', N'210', CAST(0xFF310B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (200, N'111', N'5010', N'210', CAST(0x00320B00 AS Date), NULL, 0, 10, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (201, N'111', N'5010', N'210', CAST(0x01320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (202, N'111', N'5010', N'210', CAST(0x02320B00 AS Date), 18, 1, 9, 0, NULL, 7)

    GO

    print 'Processed 200 total records'

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (203, N'111', N'5010', N'210', CAST(0x03320B00 AS Date), NULL, 2, NULL, NULL, NULL, 6)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (204, N'111', N'5010', N'210', CAST(0x04320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (205, N'111', N'5010', N'210', CAST(0x05320B00 AS Date), NULL, 0, 10, NULL, NULL, 7)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (206, N'111', N'5010', N'210', CAST(0x06320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (207, N'111', N'5010', N'210', CAST(0x07320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (208, N'111', N'5010', N'210', CAST(0x08320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (209, N'111', N'5010', N'210', CAST(0x09320B00 AS Date), NULL, NULL, 9, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (210, N'111', N'5010', N'210', CAST(0x0A320B00 AS Date), 18, 0, NULL, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (211, N'111', N'5010', N'210', CAST(0x0B320B00 AS Date), 20, 0, NULL, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (212, N'111', N'5010', N'210', CAST(0x0C320B00 AS Date), NULL, 1, NULL, NULL, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (213, N'111', N'5010', N'210', CAST(0x0D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (214, N'111', N'5010', N'210', CAST(0x0E320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (215, N'111', N'5010', N'210', CAST(0x0F320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (216, N'111', N'5010', N'210', CAST(0x10320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (217, N'111', N'5010', N'210', CAST(0x11320B00 AS Date), 21, NULL, NULL, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (218, N'111', N'5010', N'210', CAST(0x12320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (219, N'111', N'5010', N'210', CAST(0x13320B00 AS Date), 22, 0, 10, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (220, N'111', N'5010', N'210', CAST(0x14320B00 AS Date), 23, NULL, 11, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (221, N'111', N'5010', N'210', CAST(0x15320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (222, N'111', N'5010', N'210', CAST(0x16320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (223, N'111', N'5010', N'210', CAST(0x17320B00 AS Date), 24, NULL, NULL, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (224, N'111', N'5010', N'210', CAST(0x18320B00 AS Date), NULL, 0, 13, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (225, N'111', N'5010', N'210', CAST(0x19320B00 AS Date), NULL, NULL, 12, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (226, N'111', N'5010', N'210', CAST(0x1A320B00 AS Date), 26, NULL, NULL, NULL, 4, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (227, N'111', N'5010', N'210', CAST(0x1B320B00 AS Date), NULL, 1, NULL, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (228, N'111', N'5010', N'210', CAST(0x1C320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (229, N'111', N'5010', N'210', CAST(0x1D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (230, N'111', N'5010', N'210', CAST(0x1E320B00 AS Date), 28, 0, 13, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (231, N'111', N'5010', N'210', CAST(0x1F320B00 AS Date), NULL, 1, 14, 2, 2, 8)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (232, N'111', N'5010', N'210', CAST(0x20320B00 AS Date), NULL, 0, 15, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (233, N'111', N'5010', N'210', CAST(0x21320B00 AS Date), NULL, NULL, 14, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (234, N'111', N'5010', N'210', CAST(0x22320B00 AS Date), NULL, 0, 17, 2, 1, 7)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (235, N'111', N'5010', N'210', CAST(0x23320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (236, N'111', N'5010', N'210', CAST(0x24320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (237, N'111', N'5010', N'210', CAST(0x25320B00 AS Date), 29, 2, 15, 4, 2, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (238, N'111', N'5010', N'210', CAST(0x26320B00 AS Date), NULL, 2, 15, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (239, N'111', N'5010', N'210', CAST(0x27320B00 AS Date), 29, 0, 14, 4, 1, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (240, N'111', N'5010', N'210', CAST(0x28320B00 AS Date), 25, 2, 13, 4, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (241, N'111', N'5010', N'210', CAST(0x29320B00 AS Date), NULL, 3, 12, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (242, N'111', N'5010', N'210', CAST(0x2A320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (243, N'111', N'5010', N'210', CAST(0x2B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (244, N'111', N'5010', N'210', CAST(0x2C320B00 AS Date), 24, 3, 11, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (245, N'111', N'5010', N'210', CAST(0x2D320B00 AS Date), 23, 1, 11, 4, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (246, N'111', N'5010', N'210', CAST(0x2E320B00 AS Date), NULL, 2, NULL, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (247, N'111', N'5010', N'210', CAST(0x2F320B00 AS Date), NULL, 5, NULL, 0, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (248, N'111', N'5010', N'210', CAST(0x30320B00 AS Date), NULL, NULL, 10, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (249, N'111', N'5010', N'210', CAST(0x31320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (250, N'111', N'5010', N'210', CAST(0x32320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (251, N'111', N'5010', N'210', CAST(0x33320B00 AS Date), 22, 4, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (252, N'111', N'5010', N'210', CAST(0x34320B00 AS Date), NULL, 2, 11, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (253, N'111', N'5010', N'210', CAST(0x35320B00 AS Date), NULL, 1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (254, N'111', N'5010', N'210', CAST(0x36320B00 AS Date), 20, NULL, 10, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (255, N'111', N'5010', N'210', CAST(0x37320B00 AS Date), NULL, 1, 11, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (256, N'111', N'5010', N'210', CAST(0x38320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (257, N'111', N'5010', N'210', CAST(0x39320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (258, N'111', N'5010', N'210', CAST(0x3A320B00 AS Date), NULL, 4, 8, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (259, N'111', N'5010', N'210', CAST(0x3B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (260, N'111', N'5010', N'210', CAST(0x3C320B00 AS Date), NULL, 3, 10, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (261, N'111', N'5010', N'210', CAST(0x3D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (262, N'111', N'5010', N'210', CAST(0x3E320B00 AS Date), 21, NULL, 9, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (263, N'111', N'5010', N'210', CAST(0x3F320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (264, N'111', N'5010', N'210', CAST(0x40320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (265, N'111', N'5010', N'210', CAST(0x41320B00 AS Date), NULL, 2, 9, 2, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (266, N'111', N'5010', N'210', CAST(0x42320B00 AS Date), 20, 1, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (267, N'111', N'5010', N'210', CAST(0x43320B00 AS Date), 19, 3, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (268, N'111', N'5010', N'210', CAST(0x44320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (269, N'111', N'5010', N'210', CAST(0x45320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (270, N'111', N'5010', N'210', CAST(0x46320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (271, N'111', N'5010', N'210', CAST(0x47320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (272, N'111', N'5010', N'210', CAST(0x48320B00 AS Date), NULL, 2, 10, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (273, N'111', N'5010', N'210', CAST(0x49320B00 AS Date), NULL, 0, 11, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (274, N'111', N'5010', N'210', CAST(0x4A320B00 AS Date), 21, 2, 12, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (275, N'111', N'5010', N'210', CAST(0x4B320B00 AS Date), NULL, NULL, 11, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (276, N'111', N'5010', N'210', CAST(0x4C320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (277, N'111', N'5010', N'210', CAST(0x4D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (278, N'111', N'5010', N'210', CAST(0x4E320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (279, N'111', N'5010', N'210', CAST(0x4F320B00 AS Date), NULL, 1, 10, 2, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (280, N'111', N'5010', N'210', CAST(0x50320B00 AS Date), 22, 2, 10, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (281, N'111', N'5010', N'210', CAST(0x51320B00 AS Date), NULL, 1, 11, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (282, N'111', N'5010', N'210', CAST(0x52320B00 AS Date), NULL, 0, 12, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (283, N'111', N'5010', N'210', CAST(0x53320B00 AS Date), 22, 1, NULL, NULL, 1, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (284, N'111', N'5010', N'210', CAST(0x54320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (285, N'111', N'5010', N'210', CAST(0x55320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (286, N'111', N'5010', N'210', CAST(0x56320B00 AS Date), NULL, 0, 13, 2, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (287, N'111', N'5010', N'210', CAST(0x57320B00 AS Date), NULL, 1, 12, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (288, N'111', N'5010', N'210', CAST(0x58320B00 AS Date), NULL, 2, 13, 0, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (289, N'111', N'5010', N'210', CAST(0x59320B00 AS Date), 25, 3, 14, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (290, N'111', N'5010', N'210', CAST(0x5A320B00 AS Date), 26, 4, 14, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (291, N'111', N'5010', N'210', CAST(0x5B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (292, N'111', N'5010', N'210', CAST(0x5C320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (293, N'111', N'5010', N'210', CAST(0x5D320B00 AS Date), 27, 4, 11, 1, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (294, N'111', N'5010', N'210', CAST(0x5E320B00 AS Date), 24, 2, 11, 1, 4, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (295, N'111', N'5010', N'210', CAST(0x5F320B00 AS Date), 25, 5, NULL, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (296, N'111', N'5010', N'210', CAST(0x60320B00 AS Date), 25, 6, 11, 1, 1, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (297, N'111', N'5010', N'210', CAST(0x61320B00 AS Date), 23, 4, 10, 1, 1, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (298, N'111', N'5010', N'210', CAST(0x62320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (299, N'111', N'5010', N'210', CAST(0x63320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (300, N'111', N'5010', N'210', CAST(0x64320B00 AS Date), NULL, 5, 11, 0, NULL, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (301, N'111', N'5010', N'210', CAST(0x65320B00 AS Date), 22, 4, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (302, N'111', N'5010', N'210', CAST(0x66320B00 AS Date), 23, 1, 14, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (303, N'111', N'5010', N'210', CAST(0x67320B00 AS Date), NULL, NULL, NULL, 0, 2, NULL)

    GO

    print 'Processed 300 total records'

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (304, N'111', N'5010', N'210', CAST(0x68320B00 AS Date), 24, 1, NULL, NULL, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (305, N'111', N'5010', N'210', CAST(0x69320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (306, N'111', N'5010', N'210', CAST(0x6A320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (307, N'111', N'5010', N'210', CAST(0x6B320B00 AS Date), NULL, 0, 15, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (308, N'111', N'5010', N'210', CAST(0x6C320B00 AS Date), 26, NULL, 14, 1, NULL, 7)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (309, N'111', N'5010', N'210', CAST(0x6D320B00 AS Date), 26, 1, 10, 4, 1, 8)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (310, N'111', N'5010', N'210', CAST(0x6E320B00 AS Date), NULL, 1, 11, 2, 3, 7)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (311, N'111', N'5010', N'210', CAST(0x6F320B00 AS Date), NULL, NULL, 10, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (312, N'111', N'5010', N'210', CAST(0x70320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (313, N'111', N'5010', N'210', CAST(0x71320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (314, N'111', N'5010', N'210', CAST(0x72320B00 AS Date), 25, 0, 10, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (315, N'111', N'5010', N'210', CAST(0x73320B00 AS Date), NULL, 2, 10, 2, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (316, N'111', N'5010', N'210', CAST(0x74320B00 AS Date), 24, 1, 10, 2, NULL, 6)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (317, N'111', N'5010', N'210', CAST(0x75320B00 AS Date), 22, 1, 9, 3, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (318, N'111', N'5010', N'210', CAST(0x76320B00 AS Date), 21, 0, 10, 1, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (319, N'111', N'5010', N'210', CAST(0x77320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (320, N'111', N'5010', N'210', CAST(0x78320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (321, N'111', N'5010', N'210', CAST(0x79320B00 AS Date), 21, 2, 9, 0, 2, 6)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (322, N'111', N'5010', N'210', CAST(0x7A320B00 AS Date), NULL, 0, 11, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (323, N'111', N'5010', N'210', CAST(0x7B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (324, N'111', N'5010', N'210', CAST(0x7C320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (325, N'111', N'5010', N'210', CAST(0x7D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (326, N'111', N'5010', N'210', CAST(0x7E320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (327, N'111', N'5010', N'210', CAST(0x7F320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (328, N'111', N'5010', N'210', CAST(0x80320B00 AS Date), 20, NULL, 9, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (329, N'111', N'5010', N'210', CAST(0x81320B00 AS Date), NULL, 1, 8, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (330, N'111', N'5010', N'210', CAST(0x82320B00 AS Date), 19, 0, 9, 0, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (331, N'111', N'5010', N'210', CAST(0x83320B00 AS Date), NULL, 1, 8, 1, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (332, N'111', N'5010', N'210', CAST(0x84320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (333, N'111', N'5010', N'210', CAST(0x85320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (334, N'111', N'5010', N'210', CAST(0x86320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (335, N'111', N'5010', N'210', CAST(0x87320B00 AS Date), NULL, NULL, 7, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (336, N'111', N'5010', N'210', CAST(0x88320B00 AS Date), NULL, 0, 8, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (337, N'111', N'5010', N'210', CAST(0x89320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (338, N'111', N'5010', N'210', CAST(0x8A320B00 AS Date), NULL, 0, 9, 0, 4, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (339, N'111', N'5010', N'210', CAST(0x8B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (340, N'111', N'5010', N'210', CAST(0x8C320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (341, N'111', N'5010', N'210', CAST(0x8D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (342, N'111', N'5010', N'210', CAST(0x8E320B00 AS Date), 18, -1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (343, N'111', N'5010', N'210', CAST(0x8F320B00 AS Date), NULL, 0, 8, 1, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (344, N'111', N'5010', N'210', CAST(0x90320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (345, N'111', N'5010', N'210', CAST(0x91320B00 AS Date), NULL, 1, NULL, 0, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (346, N'111', N'5010', N'210', CAST(0x92320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (347, N'111', N'5010', N'210', CAST(0x93320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (348, N'111', N'5010', N'210', CAST(0x94320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (349, N'111', N'5010', N'210', CAST(0x95320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (350, N'111', N'5010', N'210', CAST(0x96320B00 AS Date), NULL, 2, 7, 0, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (351, N'111', N'5010', N'210', CAST(0x97320B00 AS Date), 17, 1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (352, N'111', N'5010', N'210', CAST(0x98320B00 AS Date), 18, NULL, NULL, NULL, 4, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (353, N'111', N'5010', N'210', CAST(0x99320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (354, N'111', N'5010', N'210', CAST(0x9A320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (355, N'111', N'5010', N'210', CAST(0x9B320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (356, N'111', N'5010', N'210', CAST(0x9C320B00 AS Date), NULL, 0, 8, NULL, 2, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (357, N'111', N'5010', N'210', CAST(0x9D320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (358, N'111', N'5010', N'210', CAST(0x9E320B00 AS Date), 17, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (359, N'111', N'5010', N'210', CAST(0x9F320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (360, N'111', N'5010', N'210', CAST(0xA0320B00 AS Date), NULL, 0, 6, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (361, N'111', N'5010', N'210', CAST(0xA1320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (362, N'111', N'5010', N'210', CAST(0xA2320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (363, N'111', N'5010', N'210', CAST(0xA3320B00 AS Date), 16, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (364, N'111', N'5010', N'210', CAST(0xA4320B00 AS Date), NULL, NULL, 5, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (365, N'111', N'5010', N'210', CAST(0xA5320B00 AS Date), NULL, 2, NULL, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (366, N'111', N'5010', N'210', CAST(0xA6320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (367, N'111', N'5010', N'210', CAST(0xA7320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (368, N'111', N'5010', N'210', CAST(0xA8320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (369, N'111', N'5010', N'210', CAST(0xA9320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (370, N'111', N'5010', N'210', CAST(0xAA320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (371, N'111', N'5010', N'210', CAST(0xAB320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (372, N'111', N'5010', N'210', CAST(0xAC320B00 AS Date), NULL, 2, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (373, N'111', N'5010', N'210', CAST(0xAD320B00 AS Date), NULL, 0, 6, 1, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (374, N'111', N'5010', N'210', CAST(0xAE320B00 AS Date), 17, 0, 5, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (375, N'111', N'5010', N'210', CAST(0xAF320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (376, N'111', N'5010', N'210', CAST(0xB0320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (377, N'111', N'5010', N'210', CAST(0xB1320B00 AS Date), 19, 0, NULL, NULL, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (378, N'111', N'5010', N'210', CAST(0xB2320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (379, N'111', N'5010', N'210', CAST(0xB3320B00 AS Date), 23, 0, 6, NULL, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (380, N'111', N'5010', N'210', CAST(0xB4320B00 AS Date), 17, 0, 8, NULL, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (381, N'111', N'5010', N'210', CAST(0xB5320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (382, N'111', N'5010', N'210', CAST(0xB6320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (383, N'111', N'5010', N'210', CAST(0xB7320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (384, N'111', N'5010', N'210', CAST(0xB8320B00 AS Date), NULL, NULL, 7, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (385, N'111', N'5010', N'210', CAST(0xB9320B00 AS Date), NULL, NULL, 5, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (386, N'111', N'5010', N'210', CAST(0xBA320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (387, N'111', N'5010', N'210', CAST(0xBB320B00 AS Date), 16, 1, NULL, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (388, N'111', N'5010', N'210', CAST(0xBC320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (389, N'111', N'5010', N'210', CAST(0xBD320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (390, N'111', N'5010', N'210', CAST(0xBE320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (391, N'111', N'5010', N'210', CAST(0xBF320B00 AS Date), NULL, 2, NULL, 0, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (392, N'111', N'5010', N'210', CAST(0xC0320B00 AS Date), 17, 5, 4, 0, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (393, N'111', N'5010', N'210', CAST(0xC1320B00 AS Date), NULL, 3, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (394, N'111', N'5010', N'210', CAST(0xC2320B00 AS Date), 16, 0, 6, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (395, N'111', N'5010', N'210', CAST(0xC3320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (396, N'111', N'5010', N'210', CAST(0xC4320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (397, N'111', N'5010', N'210', CAST(0xC5320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (398, N'111', N'5010', N'210', CAST(0xC6320B00 AS Date), 15, 0, 5, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (399, N'111', N'5010', N'210', CAST(0xC7320B00 AS Date), NULL, 1, NULL, 0, 3, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (400, N'111', N'5010', N'210', CAST(0xC8320B00 AS Date), NULL, 1, 6, NULL, 0, 6)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (401, N'111', N'5010', N'210', CAST(0xC9320B00 AS Date), NULL, 2, NULL, NULL, NULL, 5)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (402, N'111', N'5010', N'210', CAST(0xCA320B00 AS Date), 14, 1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (403, N'111', N'5010', N'210', CAST(0xCB320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (404, N'111', N'5010', N'210', CAST(0xCC320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    GO

    print 'Processed 400 total records'

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (405, N'111', N'5010', N'210', CAST(0xCD320B00 AS Date), 14, 1, 7, NULL, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (406, N'111', N'5010', N'210', CAST(0xCE320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (407, N'111', N'5010', N'210', CAST(0xCF320B00 AS Date), 16, 2, NULL, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (408, N'111', N'5010', N'210', CAST(0xD0320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (409, N'111', N'5010', N'210', CAST(0xD1320B00 AS Date), NULL, 0, 9, NULL, 0, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (410, N'111', N'5010', N'210', CAST(0xD2320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (411, N'111', N'5010', N'210', CAST(0xD3320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (412, N'111', N'5010', N'210', CAST(0xD4320B00 AS Date), 15, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (413, N'111', N'5010', N'210', CAST(0xD5320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (414, N'111', N'5010', N'210', CAST(0xD6320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (415, N'111', N'5010', N'210', CAST(0xD7320B00 AS Date), 16, 0, NULL, NULL, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (416, N'111', N'5010', N'210', CAST(0xD8320B00 AS Date), 14, 1, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (417, N'111', N'5010', N'210', CAST(0xD9320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (418, N'111', N'5010', N'210', CAST(0xDA320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (419, N'111', N'5010', N'210', CAST(0xDB320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (420, N'111', N'5010', N'210', CAST(0xDC320B00 AS Date), NULL, 0, 10, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (421, N'111', N'5010', N'210', CAST(0xDD320B00 AS Date), NULL, NULL, 9, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (422, N'111', N'5010', N'210', CAST(0xDE320B00 AS Date), 15, 0, NULL, 0, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (423, N'111', N'5010', N'210', CAST(0xDF320B00 AS Date), 14, 0, 10, NULL, 1, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (424, N'111', N'5010', N'210', CAST(0xE0320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (425, N'111', N'5010', N'210', CAST(0xE1320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (426, N'111', N'5010', N'210', CAST(0xE2320B00 AS Date), NULL, 1, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (427, N'111', N'5010', N'210', CAST(0xE3320B00 AS Date), 13, 0, 8, 1, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (428, N'111', N'5010', N'210', CAST(0xE4320B00 AS Date), NULL, 1, 8, 0, 0, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (429, N'111', N'5010', N'210', CAST(0xE5320B00 AS Date), 15, NULL, 7, 3, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (430, N'111', N'5010', N'210', CAST(0xE6320B00 AS Date), 17, 2, 7, 1, 4, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (431, N'111', N'5010', N'210', CAST(0xE7320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (432, N'111', N'5010', N'210', CAST(0xE8320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (433, N'111', N'5010', N'210', CAST(0xE9320B00 AS Date), NULL, 2, 8, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (434, N'111', N'5010', N'210', CAST(0xEA320B00 AS Date), 17, 3, 8, 0, 3, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (435, N'111', N'5010', N'210', CAST(0xEB320B00 AS Date), 16, 2, NULL, NULL, 2, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (436, N'111', N'5010', N'210', CAST(0xEC320B00 AS Date), 15, 3, NULL, NULL, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (437, N'111', N'5010', N'210', CAST(0xED320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (438, N'111', N'5010', N'210', CAST(0xEE320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (439, N'111', N'5010', N'210', CAST(0xEF320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (440, N'111', N'5010', N'210', CAST(0xF0320B00 AS Date), NULL, 2, 7, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (441, N'111', N'5010', N'210', CAST(0xF1320B00 AS Date), 15, 0, 9, 2, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (442, N'111', N'5010', N'210', CAST(0xF2320B00 AS Date), 16, 3, NULL, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (443, N'111', N'5010', N'210', CAST(0xF3320B00 AS Date), NULL, 3, 9, 0, 0, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (444, N'111', N'5010', N'210', CAST(0xF4320B00 AS Date), NULL, 4, 8, 0, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (445, N'111', N'5010', N'210', CAST(0xF5320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (446, N'111', N'5010', N'210', CAST(0xF6320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (447, N'111', N'5010', N'210', CAST(0xF7320B00 AS Date), NULL, 2, 8, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (448, N'111', N'5010', N'210', CAST(0xF8320B00 AS Date), NULL, 1, 9, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (449, N'111', N'5010', N'210', CAST(0xF9320B00 AS Date), 14, 0, 9, 0, NULL, 4)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (450, N'111', N'5010', N'210', CAST(0xFA320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (451, N'111', N'5010', N'210', CAST(0xFB320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (452, N'111', N'5010', N'210', CAST(0xFC320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (453, N'111', N'5010', N'210', CAST(0xFD320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (454, N'111', N'5010', N'210', CAST(0xFE320B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (455, N'111', N'5010', N'210', CAST(0xFF320B00 AS Date), 15, 2, 7, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (456, N'111', N'5010', N'210', CAST(0x00330B00 AS Date), NULL, 0, 7, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (457, N'111', N'5010', N'210', CAST(0x01330B00 AS Date), 13, 0, 7, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (458, N'111', N'5010', N'210', CAST(0x02330B00 AS Date), 12, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (459, N'111', N'5010', N'210', CAST(0x03330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (460, N'111', N'5010', N'210', CAST(0x04330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (461, N'111', N'5010', N'210', CAST(0x05330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (462, N'111', N'5010', N'210', CAST(0x06330B00 AS Date), NULL, 0, 5, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (463, N'111', N'5010', N'210', CAST(0x07330B00 AS Date), 11, 0, 6, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (464, N'111', N'5010', N'210', CAST(0x08330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (465, N'111', N'5010', N'210', CAST(0x09330B00 AS Date), NULL, 1, NULL, NULL, NULL, 3)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (466, N'111', N'5010', N'210', CAST(0x0A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (467, N'111', N'5010', N'210', CAST(0x0B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (468, N'111', N'5010', N'210', CAST(0x0C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (469, N'111', N'5010', N'210', CAST(0x0D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (470, N'111', N'5010', N'210', CAST(0x0E330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (471, N'111', N'5010', N'210', CAST(0x0F330B00 AS Date), NULL, 0, 8, NULL, NULL, 2)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (472, N'111', N'5010', N'210', CAST(0x10330B00 AS Date), NULL, 1, 7, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (473, N'111', N'5010', N'210', CAST(0x11330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (474, N'111', N'5010', N'210', CAST(0x12330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (475, N'111', N'5010', N'210', CAST(0x13330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (476, N'111', N'5010', N'210', CAST(0x14330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (477, N'111', N'5010', N'210', CAST(0x15330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (478, N'111', N'5010', N'210', CAST(0x16330B00 AS Date), NULL, 0, 8, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (479, N'111', N'5010', N'210', CAST(0x17330B00 AS Date), NULL, NULL, 7, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (480, N'111', N'5010', N'210', CAST(0x18330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (481, N'111', N'5010', N'210', CAST(0x19330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (482, N'111', N'5010', N'210', CAST(0x1A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (483, N'111', N'5010', N'210', CAST(0x1B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (484, N'111', N'5010', N'210', CAST(0x1C330B00 AS Date), 10, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (485, N'111', N'5010', N'210', CAST(0x1D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (486, N'111', N'5010', N'210', CAST(0x1E330B00 AS Date), NULL, NULL, 6, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (487, N'111', N'5010', N'210', CAST(0x1F330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (488, N'111', N'5010', N'210', CAST(0x20330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (489, N'111', N'5010', N'210', CAST(0x21330B00 AS Date), NULL, 1, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (490, N'111', N'5010', N'210', CAST(0x22330B00 AS Date), NULL, 0, 7, 0, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (491, N'111', N'5010', N'210', CAST(0x23330B00 AS Date), 10, 1, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (492, N'111', N'5010', N'210', CAST(0x24330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (493, N'111', N'5010', N'210', CAST(0x25330B00 AS Date), NULL, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (494, N'111', N'5010', N'210', CAST(0x26330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (495, N'111', N'5010', N'210', CAST(0x27330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (496, N'111', N'5010', N'210', CAST(0x28330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (497, N'111', N'5010', N'210', CAST(0x29330B00 AS Date), 9, NULL, 6, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (498, N'111', N'5010', N'210', CAST(0x2A330B00 AS Date), NULL, 0, 7, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (499, N'111', N'5010', N'210', CAST(0x2B330B00 AS Date), 8, 0, 6, 0, 1, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (500, N'111', N'5010', N'210', CAST(0x2C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (501, N'111', N'5010', N'210', CAST(0x2D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (502, N'111', N'5010', N'210', CAST(0x2E330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (503, N'111', N'5010', N'210', CAST(0x2F330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (504, N'111', N'5010', N'210', CAST(0x30330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (505, N'111', N'5010', N'210', CAST(0x31330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    GO

    print 'Processed 500 total records'

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (506, N'111', N'5010', N'210', CAST(0x32330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (507, N'111', N'5010', N'210', CAST(0x33330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (508, N'111', N'5010', N'210', CAST(0x34330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (509, N'111', N'5010', N'210', CAST(0x35330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (510, N'111', N'5010', N'210', CAST(0x36330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (511, N'111', N'5010', N'210', CAST(0x37330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (512, N'111', N'5010', N'210', CAST(0x38330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (513, N'111', N'5010', N'210', CAST(0x39330B00 AS Date), NULL, 0, NULL, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (514, N'111', N'5010', N'210', CAST(0x3A330B00 AS Date), 7, NULL, 5, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (515, N'111', N'5010', N'210', CAST(0x3B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (516, N'111', N'5010', N'210', CAST(0x3C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (517, N'111', N'5010', N'210', CAST(0x3D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (518, N'111', N'5010', N'210', CAST(0x3E330B00 AS Date), NULL, 1, NULL, NULL, NULL, 0)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (519, N'111', N'5010', N'210', CAST(0x3F330B00 AS Date), 6, 1, NULL, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (520, N'111', N'5010', N'210', CAST(0x40330B00 AS Date), NULL, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (521, N'111', N'5010', N'210', CAST(0x41330B00 AS Date), 5, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (522, N'111', N'5010', N'210', CAST(0x42330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (523, N'111', N'5010', N'210', CAST(0x43330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (524, N'111', N'5010', N'210', CAST(0x44330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (525, N'111', N'5010', N'210', CAST(0x45330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (526, N'111', N'5010', N'210', CAST(0x46330B00 AS Date), 7, 2, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (527, N'111', N'5010', N'210', CAST(0x47330B00 AS Date), 8, 0, 8, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (528, N'111', N'5010', N'210', CAST(0x48330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (529, N'111', N'5010', N'210', CAST(0x49330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (530, N'111', N'5010', N'210', CAST(0x4A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (531, N'111', N'5010', N'210', CAST(0x4B330B00 AS Date), NULL, NULL, 7, 0, NULL, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (532, N'111', N'5010', N'210', CAST(0x4C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (533, N'111', N'5010', N'210', CAST(0x4D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (534, N'111', N'5010', N'210', CAST(0x4E330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (535, N'111', N'5010', N'210', CAST(0x4F330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (536, N'111', N'5010', N'210', CAST(0x50330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (537, N'111', N'5010', N'210', CAST(0x51330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (538, N'111', N'5010', N'210', CAST(0x52330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (539, N'111', N'5010', N'210', CAST(0x53330B00 AS Date), NULL, 3, 4, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (540, N'111', N'5010', N'210', CAST(0x54330B00 AS Date), 6, 0, 5, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (541, N'111', N'5010', N'210', CAST(0x55330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (542, N'111', N'5010', N'210', CAST(0x56330B00 AS Date), 7, 0, 6, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (543, N'111', N'5010', N'210', CAST(0x57330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (544, N'111', N'5010', N'210', CAST(0x58330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (545, N'111', N'5010', N'210', CAST(0x59330B00 AS Date), NULL, 0, 6, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (546, N'111', N'5010', N'210', CAST(0x5A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (547, N'111', N'5010', N'210', CAST(0x5B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (548, N'111', N'5010', N'210', CAST(0x5C330B00 AS Date), NULL, 0, 5, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (549, N'111', N'5010', N'210', CAST(0x5D330B00 AS Date), NULL, 1, NULL, 0, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (550, N'111', N'5010', N'210', CAST(0x5E330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (551, N'111', N'5010', N'210', CAST(0x5F330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (552, N'111', N'5010', N'210', CAST(0x60330B00 AS Date), 8, 1, 6, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (553, N'111', N'5010', N'210', CAST(0x61330B00 AS Date), 8, 1, 6, NULL, 1, 0)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (554, N'111', N'5010', N'210', CAST(0x62330B00 AS Date), 8, 1, 5, 0, 1, 1)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (555, N'111', N'5010', N'210', CAST(0x63330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (556, N'111', N'5010', N'210', CAST(0x64330B00 AS Date), NULL, 1, 6, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (557, N'111', N'5010', N'210', CAST(0x65330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (558, N'111', N'5010', N'210', CAST(0x66330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (559, N'111', N'5010', N'210', CAST(0x67330B00 AS Date), NULL, 1, 6, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (560, N'111', N'5010', N'210', CAST(0x68330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (561, N'111', N'5010', N'210', CAST(0x69330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (562, N'111', N'5010', N'210', CAST(0x6A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (563, N'111', N'5010', N'210', CAST(0x6B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (564, N'111', N'5010', N'210', CAST(0x6C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (565, N'111', N'5010', N'210', CAST(0x6D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (566, N'111', N'5010', N'210', CAST(0x6E330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (567, N'111', N'5010', N'210', CAST(0x6F330B00 AS Date), 7, 0, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (568, N'111', N'5010', N'210', CAST(0x70330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (569, N'111', N'5010', N'210', CAST(0x71330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (570, N'111', N'5010', N'210', CAST(0x72330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (571, N'111', N'5010', N'210', CAST(0x73330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (572, N'111', N'5010', N'210', CAST(0x74330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (573, N'111', N'5010', N'210', CAST(0x75330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (574, N'111', N'5010', N'210', CAST(0x76330B00 AS Date), 8, 1, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (575, N'111', N'5010', N'210', CAST(0x77330B00 AS Date), 7, 1, NULL, NULL, 0, 0)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (576, N'111', N'5010', N'210', CAST(0x78330B00 AS Date), NULL, 0, 7, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (577, N'111', N'5010', N'210', CAST(0x79330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (578, N'111', N'5010', N'210', CAST(0x7A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (579, N'111', N'5010', N'210', CAST(0x7B330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (580, N'111', N'5010', N'210', CAST(0x7C330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (581, N'111', N'5010', N'210', CAST(0x7D330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (582, N'111', N'5010', N'210', CAST(0x7E330B00 AS Date), 7, NULL, 6, 1, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (583, N'111', N'5010', N'210', CAST(0x7F330B00 AS Date), 8, 1, NULL, 0, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (584, N'111', N'5010', N'210', CAST(0x80330B00 AS Date), 8, 0, 7, NULL, 0, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (585, N'111', N'5010', N'210', CAST(0x81330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (586, N'111', N'5010', N'210', CAST(0x82330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (587, N'111', N'5010', N'210', CAST(0x83330B00 AS Date), 7, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (588, N'111', N'5010', N'210', CAST(0x84330B00 AS Date), 7, NULL, 6, NULL, 1, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (589, N'111', N'5010', N'210', CAST(0x85330B00 AS Date), NULL, 0, 6, 0, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (590, N'111', N'5010', N'210', CAST(0x86330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (591, N'111', N'5010', N'210', CAST(0x87330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (592, N'111', N'5010', N'210', CAST(0x88330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (593, N'111', N'5010', N'210', CAST(0x89330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

    INSERT [dbo].[TestTable2] ([RowNum], [Category], [Class], [Location], [Datum], [Owned], [Beschikbaar], [OnRent], [Returned], [InShop], [OtherShop]) VALUES (594, N'111', N'5010', N'210', CAST(0x8A330B00 AS Date), NULL, NULL, NULL, NULL, NULL, NULL)

  • What's with the binary dates?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Hi,

    Well, that's the way SQL Server 2008 R2 generates the script with data. If I run this script every thing looks fine. Teh column Datum (date in dutch) is a normal date column and the data looks like normal dates.

    I would say , run the script and see yourself.

    Regards,

    Dick Herberts

    Hope you can help , the problem looks simpler as it is in reality

  • Dick Herberts-320552 (11/17/2010)


    I would say , run the script and see yourself.

    That would be great if I had a SS2008 instance to run it on. This fails on SS2005. The code to create the solution for you should be portable between versions, but it's too much work for someone to create your test data in that format.

    Since you're new, I'll point you to the forum thread in my signature line. This thread outlines posting sample data for best (and faster) responses and help.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Hi John,

    Ok i understand. I can send another smaller testfile with some data. I will create something for you.

    Do you think you have a working solution for my problem?

    Regards,

    Dick Herberts

    i will send you another testfile in 10 minutes

  • Hi John,

    Here's the new testtable with data (works also on SQL Server 2005)

    as you can see there are 3 different category,class location combinations in this testfile

    category=111

    class=5010

    location=210

    category=111

    class=5010

    location=230

    category=111

    class=5010

    location=240

    for every category,class,location combination RowNum starts with 1 (row 1 has always values)

    success

    Regards,

    Dick Herberts

    CREATE TABLE [dbo].[TestTable](

    [RowNo] [int] NULL,

    [Category] [char](3) NULL,

    [Class] [char](4) NULL,

    [Location] [char](3) NULL,

    [Datum] [datetime] NULL,

    [Owned] [int] NULL,

    [Beschikbaar] [int] NULL,

    [OnRent] [int] NULL

    ) ON [PRIMARY]

    INSERT INTO TestTable

    VALUES

    (1,'111','5010','210','20100101', 12,1,0),

    (2,'111','5010','210','20100102', NULL,NULL,NULL),

    (3,'111','5010','210','20100103', 13,8,NULL),

    (4,'111','5010','210','20100104', 12,NULL,3),

    (5,'111','5010','210','20100105', 12,5,NULL),

    (6,'111','5010','210','20100106', 15,6,4),

    (7,'111','5010','210','20100107', NULL,NULL,3),

    (8,'111','5010','210','20100108', NULL,17,0),

    (9,'111','5010','210','20100109', 7,16,1),

    (10,'111','5010','210','20100110', NULL,18,NULL),

    (11,'111','5010','210','20100111', 12,1,2),

    (12,'111','5010','210','20100112', NULL,6,6),

    (13,'111','5010','210','20100113', NULL,NULL,NULL),

    (14,'111','5010','210','20100114', NULL,NULL,NULL),

    (1,'111','5010','230','20100101', 1,17,2),

    (2,'111','5010','230','20100102', NULL,1,NULL),

    (3,'111','5010','230','20100103', 13,NULL,1),

    (1,'111','5010','240','20100101', 2,0,2),

    (2,'111','5010','240','20100102', NULL,3,NULL),

    (3,'111','5010','240','20100103', 12,5,10),

    (4,'111','5010','240','20100104', 1,NULL,NULL),

    (5,'111','5010','240','20100105', NULL,6,5),

    (6,'111','5010','240','20100106', 7,NULL,35),

    (7,'111','5010','240','20100107', NULL,NULL,36),

    (8,'111','5010','240','20100108', NULL,1,NULL),

    (9,'111','5010','240','20100109', 4,3,7),

    (10,'111','5010','240','20100110', NULL,8,NULL),

    (11,'111','5010','240','20100111', NULL,NULL,NULL);

  • This form of the update statement has special rules for running in this manner. They MUST be followed, or your data can be made wrong. See comments in code for more information.

    DECLARE @Owned INT = 0,

    @OnRent INT = 0,

    @Sequence INT = 0,

    @Category CHAR(3);

    -- This form of the UPDATE statement has some particular rules.

    -- See Jeff Moden's article at http://www.sqlservercentral.com/articles/T-SQL/68467/

    -- for a complete discussion of how this works, and all of the rules for utilizing it.

    WITH SafetyCheck AS

    (

    SELECT Category,

    Class,

    Location,

    RowNo,

    Owned,

    OnRent,

    Sequence = ROW_NUMBER() OVER (ORDER BY Category,Class,Location,RowNo)

    FROM dbo.TestTable

    )

    UPDATE t

    SET @Sequence = CASE WHEN Sequence = @Sequence + 1 THEN @Sequence + 1

    ELSE 1/0 END,

    @Owned = Owned = IsNull(Owned, @Owned),

    @OnRent = OnRent = ISNULL(OnRent, @OnRent),

    @Category = Category -- ANCHOR COLUMN

    FROM SafetyCheck t WITH (TABLOCKX)

    OPTION (MAXDOP 1);

    select * from dbo.TestTable;

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Good job Wayne....you beat me to it. I know a cte could do the trick, I was just working through the update logic.

    Great solution!

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic. Login to reply