Query just hangs!

  • I have a table containing just under 90 million rows

    There are 21 columns and the table is clustered on a sequential ID column

    The query I would like to run is this:

    SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE ( (a.Hierarchy < b.Hierarchy) OR (a.Hierarchy = b.Hierarchy AND a.ID > b.ID) )

    However, when I check the progress of the query using sp_whoisactive, the read value stays at around 200 and nothing happens for hours.

    I have implemented the following indexes but none of them seem to make any difference at all!

    CREATE NONCLUSTERED INDEX [IX_MK3] ON [dbo].[Merit_Build2]

    (

    [Country] ASC,

    [Postcode] ASC,

    [OrganisationName] ASC,

    [Address1] ASC,

    [ID] ASC,

    [Hierarchy] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    GO

    and

    CREATE NONCLUSTERED INDEX [IX_MK3b] ON [dbo].[Merit_Build2]

    (

    [Country] ASC,

    [Postcode] ASC,

    [OrganisationName] ASC,

    [Address2] ASC,

    [ID] ASC,

    [Hierarchy] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    GO

    Any suggestions please?!

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE ( (a.Hierarchy < b.Hierarchy) OR (a.Hierarchy = b.Hierarchy AND a.ID > b.ID) )

    I don't know what you are trying to accomplish with this query, but I can guarantee that this query is not what you want to run to do it. That or is going to get you about 1 kajillion rows back I imagine. 🙂

    Tell us what your objective is please.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Record linkage once again!

    Here I'm looking for records that have the same address! I need to run this query so I can generate a Site ID per record.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • I doubt triangular joins are the right solution for that (or for much to be honest). There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Table defs, sample data?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • They're very narrow triangles - having dealt with this in the near past. Nevertheless, with two of them ORred together, the optimiser will likely choke. Try splitting them up and UNIONing the result. Check the actual plan of each to ensure you're getting an index scan on one side and seeks on the other and check the nested loops join operator carefully - better still, post the two plans here so we can play 🙂

    SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE a.Hierarchy < b.Hierarchy

    SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE a.Hierarchy = b.Hierarchy AND a.ID > b.ID

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • GilaMonster (1/27/2014)


    There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Please share your secret!

    Source table looks like the below:

    CREATE TABLE [dbo].[TheTable](

    [ID] [int] IDENTITY(1,1) NOT NULL,

    [RID] [int] NULL,

    [Hierarchy] [int] NOT NULL,

    [Title] [varchar](250) NULL,

    [FullContactName] [varchar](250) NULL,

    [Forename] [varchar](250) NULL,

    [Surname] [varchar](250) NULL,

    [Telephone] [varchar](250) NULL,

    [Email] [varchar](250) NULL,

    [OrganisationName] [varchar](250) NULL,

    [Buildingname] [varchar](250) NULL,

    [Address1] [varchar](250) NULL,

    [Address2] [varchar](250) NULL,

    [Address3] [varchar](250) NULL,

    [Address4] [varchar](250) NULL,

    [Address5] [varchar](250) NULL,

    [Town] [varchar](250) NULL,

    [County] [varchar](250) NULL,

    [Postcode] [varchar](250) NULL,

    [Country] [nvarchar](100) NULL,

    [GUID] [uniqueidentifier] NULL)

    and your task is to add a new column called Site ID and populate it with a unique number to group records that have the same business name and address or no business name and address. The data is international and is not the cleanest in the world.

    What's the faster and easier method that doesn't involve using blocking

    sample data?

    No point really... I can merge a million rows in a few minutes but my problem is with large data sets. That's where all the trouble starts.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Abu Dina (1/27/2014)


    GilaMonster (1/27/2014)


    There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Please share your secret!

    Please share some sample data and expected results?

    As for avoiding blocking, that's easy, use one of the row version based isolation levels, but I suspect that's not your problem.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (1/27/2014)


    Abu Dina (1/27/2014)


    GilaMonster (1/27/2014)


    There's far faster and easier ways to find duplicates than what's looks like half a cartesian product.

    Please share your secret!

    As for avoiding blocking, that's easy, use one of the row version based isolation levels, but I suspect that's not your problem.

    Sorry I meant blocking in the context of record linkage http://datamining.anu.edu.au/publications/2003/kdd03-6pages.pdf

    I don't see the benefit of providing sample data in this instance. As I said, I have no issues merging a 4-5 million record set. It's when I have 50-100 million record set my joins start to suffer but I guess this might be too much for a SQL Server forum.

    Thanks.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • ChrisM@Work (1/27/2014)


    They're very narrow triangles - having dealt with this in the near past. Nevertheless, with two of them ORred together, the optimiser will likely choke. Try splitting them up and UNIONing the result. Check the actual plan of each to ensure you're getting an index scan on one side and seeks on the other and check the nested loops join operator carefully - better still, post the two plans here so we can play 🙂

    SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE a.Hierarchy < b.Hierarchy

    SELECT a.ID AS Master_ID, b.ID AS Duplicate_ID

    FROM dbo.Merit_Build2 AS a

    INNER JOIN dbo.Merit_Build2 AS b

    ON a.Country = b.Country

    AND a.Postcode = b.Postcode

    AND a.organisationname = b.organisationname

    AND a.Address1 = b.Address2

    WHERE a.Hierarchy = b.Hierarchy AND a.ID > b.ID

    Hi Chris hope you're well! 😉

    Funny you should mention that because when I woke this morning at 6 to check on progress and I saw it was still running I thought of doing just as you suggested!

    I have to produce an output in the next few minutes so I won't be responding to this thread for an hour or so but I will be back! I really want to get to the bottom of this!

    Thanks.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Abu Dina (1/27/2014)


    I don't see the benefit of providing sample data in this instance.

    I don't see the point of writing you an alternate query if I can't test it on your data to make sure it does what you want. I think I know a quicker way, but without seeing what the data you have actually looks like I may well be wasting my time and your time with something that doesn't do what you want.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (1/27/2014)


    Abu Dina (1/27/2014)


    I don't see the benefit of providing sample data in this instance.

    I don't see the point of writing you an alternate query if I can't test it on your data to make sure it does what you want. I think I know a quicker way, but without seeing what the data you have actually looks like I may well be wasting my time and your time with something that doesn't do what you want.

    I concur. Performance is useless if we write queries that do not provide the proper output/effect!! And we (certainly Gail and I anyway) need some sample data and your expected output to validate we code correct solutions. Be sure to include any edge case or outlier rows to demonstrate all your logical needs.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • As requested, sample data below:

    The goal is to dedupe the list of 200 records at Site level. A site being company + address.

    I look forward to see how you guys tackle merging this kind of data!

    CREATE TABLE [dbo].[SCC](

    [ID] [int] IDENTITY(1,1) NOT NULL,

    [OrganisationName] [varchar](250) NULL,

    [Buildingname] [varchar](250) NULL,

    [Address1] [varchar](250) NULL,

    [Address2] [varchar](250) NULL,

    [Address3] [varchar](250) NULL,

    [Address5] [varchar](250) NULL,

    [Town] [varchar](250) NULL,

    [County] [varchar](250) NULL,

    [Postcode] [varchar](250) NULL,

    [Country] [nvarchar](100) NULL

    ) ON [PRIMARY]

    GO

    SET IDENTITY_INSERT [dbo].[SCC] ON

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (168931, N'ABANTO RUIZ WILMER RICARDO', NULL, N'Jr. Chasquitambo No 579 , Urb. Parque El Naranjal', N'Cajamarca', NULL, NULL, N'Los Olivos', N'! - Unclassified', N'39', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (179170, N'GAMBOA HORDAYA DIONISIO', NULL, N'Mz. K1 Lote 7 Ayacucho Pampa Olivares', NULL, NULL, NULL, N'Chosica', N'Peru - Lima', N'15', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (1466798, N'BALAROTI-PUBLICIDADE E PROPAGANDA LTDA', NULL, N'Rua Waldemar Kost 707', NULL, NULL, NULL, N'Curitiba', N'Brazil - Parana', N'81610-100', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (2112886, N'BUSINOVSKI MPK OOO', NULL, N'2 Ul.businovskaya Gorka', NULL, NULL, NULL, N'Moscow', NULL, N'125599', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (2171641, N'BUSINOVSKI MPK OAO', NULL, N'2 Businovskaya Gorka Ul.', NULL, NULL, NULL, N'Moscow', NULL, N'125599', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (2530960, N'JAN SMOLEN', NULL, N'Velka Lesna 97', NULL, NULL, NULL, N'VelkĂĄ LesnĂĄ', N'! - Unclassified', N'065 34', N'SLOVAKIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (3152672, N'KFKH CHERNIKOVOI V O', NULL, N'1 Kv.12 Ul.okruzhnaya', NULL, NULL, NULL, N'P Vasilkovo', NULL, N'238010', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (3409081, N'TRANSPOWER OIL FILTERATION', NULL, N'8/2 Shri Krishna Niwas', N'Ram Joshi Marg', NULL, NULL, N'Mumbai', N'Maharashtra', N'400084', N'INDIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (3440291, N'NAVNATH OIL FILTERNATION', NULL, N'8/2 Shrikrishna Niwas', N'Ram Joshi Marg', NULL, NULL, N'Mumbai', N'Maharashtra', N'400084', N'INDIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (4014351, N'TRANSPORT DROGOWY OSOBOWY JANUSZ BUDZIAREK', NULL, N'Ul. 11 Listopada 29/16', NULL, NULL, NULL, N'Lodz', N'! - Unclassified', N'91-371', N'POLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (4364124, N'MILLAN GUEVARA JOSUE', NULL, N'Carrera 12 13 98', NULL, NULL, NULL, N'Bogota', NULL, N'121', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (4402719, N'SOLPETROL LTDA', NULL, N'Carrera 28 11 65 Of 610', NULL, NULL, NULL, N'Bogota', NULL, N'146', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (5372145, N'FRANCES-BAÑON SL', NULL, N'Carretera De Villena Km 1 200', NULL, NULL, NULL, N'Yecla', N'Murcia', N'30510', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (5673760, N'ASESORES COMERCIALES CONTABLES Y TRIBUTARIOS S A S', NULL, N'Carrera 17 B Bis 65 Sur 33', NULL, NULL, NULL, N'Bogota', NULL, N'306', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (6772707, N'DE.MA SNC DI DE ROSA NICOLA E C', NULL, N'Corso Italia 123', NULL, NULL, NULL, N'Villaricca', N'Napoli', N'80010', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (6885990, N'ROGANTE LUIGI & C. SNC', NULL, N'Contrada Campiglione 20', NULL, NULL, NULL, N'Fermo', N'Ascoli Piceno', N'63023', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (7017648, N'PETITE CAMARGUE', NULL, N'89 Avenue Des Cigales', NULL, NULL, NULL, N'Vergeze', N'Gard', N'30310', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (7351968, N'ABBEY LANE ASSOCIATES LTD', NULL, N'15', N'Chapel Street', NULL, NULL, N'Sheffield', N'South Yorkshire', N'S13 7JL', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (7513350, N'V.D.H.', NULL, N'Vermeloux Denis', N'89 Avenue Des Cigales', NULL, NULL, N'Vergeze', N'Gard', N'30310', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (7730533, N'ZEITUNGSVERLAG SCHWERIN GESCHÄFTSFÜHRUNGS-GMBH', NULL, N'Gutenbergstr 1', NULL, NULL, NULL, N'Schwerin', NULL, N'19061', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (8513318, N'GORDIAN PORTUGAL - SGPS, S.A.', NULL, N'Rua Arquitecto Cassiano Barbosa, 44 1Âş EscritĂłrio 10', NULL, NULL, NULL, N'Porto', N'Portugal - Porto', N'4100-009', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (8521895, N'TELETWIN, LDA', NULL, N'Rua De Campolide, 351c Loja 0.07a', NULL, NULL, NULL, N'Lisboa', N'Portugal - Lisboa', N'1070-034', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (8916043, N'MESSOGEIAKAI EPICHEIRISSEIS S.A.', NULL, N'2-4 Messogeion', NULL, NULL, NULL, N'Athens', N'! - Unclassified', N'115 27', N'GREECE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (8958199, N'M&C TECHGROUP GERMANY GMBH', NULL, N'Rehhecke 79', NULL, NULL, NULL, N'Ratingen', NULL, N'40885', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (9681173, N'21ST CENTURY SERIVES', NULL, N'8 Davice Road Lahore Paksiatn', NULL, NULL, NULL, N'Lahore', NULL, N'54000', N'PAKISTAN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10273846, N'PACHECO ZORRO JUAN GUILLERMO', NULL, N'Carrera 103 A 17 35', NULL, NULL, NULL, N'Bogota', NULL, N'702', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10274758, N'ABBA MARKETING Y MEDIOS SAS', NULL, N'Calle 3 27 A 05', NULL, NULL, NULL, N'Bogota', NULL, N'144', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10350183, N'BENVARDEN HOME CARE SERVICES LTD', NULL, N'110', N'Ash Green Lane', NULL, NULL, N'Coventry', N'West Midlands', N'CV7 9AJ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10385914, N'CHRISTS COLLEGE', NULL, N'Larch Avenue', NULL, NULL, NULL, N'Guildford', N'Surrey', N'GU1 1JY', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10419397, N'PFIZER CONSUMER HEALTHCARE', NULL, N'State Road 3, Km 142 1', NULL, NULL, NULL, N'Guayama', NULL, N'00784', N'PUERTO RICO')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10479045, N'INTERNATIONAL NETWORKS SONY PICTURES', NULL, N'25 Golden Square', N'Network Operations', NULL, NULL, N'London', NULL, N'W1F 9LU', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10672160, N'KRETSLOPPSPARKEN', NULL, N'Annedalsvdgen 20', NULL, NULL, NULL, N'Kristianstad', NULL, N'SE-291 63', N'SWEDEN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10701952, N'GCI CO', NULL, N'6th Dept Gci Co', N'Xing Gang Zhong Rd 381', NULL, NULL, N'Guangzhou Gd', NULL, N'5103', N'CHINA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10764886, N'THE DATA AGENCY', NULL, N'1 Newhams Row', N'The Pavilion', NULL, NULL, N'London', NULL, N'SE1 3UZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (10781195, N'RED-GATE SOFTWARE LTD', NULL, N'Newman House', N'Cambridge Business Park', NULL, NULL, N'Cambridge', N'Cambridgeshire', N'CB4 0WZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (11100965, N'CAISA CONSULTORES Y SERVICIOS SA DE CV', NULL, N'San Francisco 1384 Torre B 2', N'Del Valle', NULL, NULL, N'Mexico', NULL, N'03100', N'MEXICO')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (11272171, N'GCI COMPANY', NULL, N'6th Dept Gci Co Po Box', N'Xing Gang Zhong Road 381', NULL, NULL, N'Guangzhou', NULL, N'510310', N'CHINA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (11756865, N'FUJIFILM ELECTRONIC IMAGIN', NULL, N'Boundary Way', N'Herts', NULL, NULL, N'Hemel Hempstead', N'Hertfordshire', N'HP2 7RH', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12208209, N'ZEITUNGSVERLAG SCHWERIN GMBH UND CO KG', NULL, N'Gutenbergstraße1', NULL, NULL, NULL, N'Schwerin', NULL, N'19061', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12366754, N'G L KAYSER', NULL, N'Robertboschstr 35', NULL, NULL, NULL, N'Mainz', NULL, N'55129', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12498093, N'CAPROSS 2004 S.L.', NULL, N'Avenida Pintor Felo Monzon 24', NULL, NULL, NULL, N'Las Palmas De Gran Canaria', NULL, N'35019', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12516124, N'21ST CENTURY SERVICES', NULL, N'8 Davice Road Lahore', NULL, NULL, NULL, N'Lahore', NULL, N'540000', N'PAKISTAN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12872985, N'SOLID ASSETS - GESTÃO IMOBILIÁRIA E SERVIÇOS ÀS EMPRESAS, UNIPESSOAL, LDA', NULL, N'Rua Arquitecto Cassiano Barbosa, 44 1º Esq. 10', NULL, NULL, NULL, N'Porto', N'Portugal - Porto', N'4100-009', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (12917391, N'VAN DER STERREN BEHEER B.V.', NULL, N'Bremweg 4a', NULL, NULL, NULL, N'Melderslo', N'Belgium - Limburg', N'5961 NE', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (13859929, N'SPRINGER HEALTHCARE', NULL, N'236 Gray''s Inn Road', NULL, NULL, NULL, N'London', N'London', N'WC1X 8HB', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (13871277, N'F R F MOTORS TOYOTA', NULL, N'Neath Road', N'Morriston', NULL, NULL, N'Swansea', N'West Glamorgan', N'SA6 8HF', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (14495951, N'THE ECONOMIST GROUP', NULL, N'25 Saint James Street', NULL, NULL, NULL, N'London', N'London', N'SW1A 1HA', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (15575981, N'PILSIK POC SL', NULL, N'Plaza Vazquez De Mella 2 - Oficina 42', NULL, NULL, NULL, N'Madrid', NULL, N'28004', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (15822890, N'JAN SMOLEN - JASMO', NULL, N'Velka Lesna 18', NULL, NULL, NULL, N'VelkĂĄ LesnĂĄ', N'! - Unclassified', N'065 34', N'SLOVAKIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (16084317, N'TRANSPORT DROGOWY OSOBOWY EUGENIUSZ KAZMIERCZAK', NULL, N'Ul. 11 Listopada 39/37', NULL, NULL, NULL, N'Lodz', N'! - Unclassified', N'91-371', N'POLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (16312623, N'APARTAMENTOS SPACE SL', NULL, N'Plaza Vazquez De Mella 2 - Oficina 32', NULL, NULL, NULL, N'Madrid', NULL, N'28004', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (16778068, N'CHEMISTREE LTD', NULL, N'Unit 7', N'Curo Park', N'Frogmore', NULL, N'St. Albans', N'Hertfordshire', N'AL2 2DD', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18124298, N'DRS TECHNOLOGY SYSTEMS UK LTD', NULL, N'Farnham Trading Estate', N'Lynwood House', NULL, NULL, N'Farnham', N'Surrey', N'GU9 9NN', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18186701, N'BEACON HOMELOANS LTD', NULL, N'One Globeside Fieldhouse Lane', NULL, NULL, NULL, N'Marlow', N'Buckinghamshire', N'SL7 1HZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18203163, N'THE DATA AGENCY (RESELLERS) LTD', NULL, N'The Pavilion Newhams Row', NULL, NULL, NULL, N'London', NULL, N'SE1 3UZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18356109, N'CURRENT SCIENCE LTD', NULL, N'6th Floor 236 Grays Inn Road', NULL, NULL, NULL, N'London', N'London', N'WC1X 8HB', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18432551, N'SALISBURY COURT RTM COMPANY LTD', NULL, N'1-12 Salisbury Court', N'Kings Avenue Holland On Sea', NULL, NULL, N'Clacton-on-sea', N'Essex', N'CO15 5SA', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18560546, N'BEN VARDEN', NULL, N'110 Ash Green Lane', NULL, NULL, NULL, N'Coventry', N'West Midlands', N'CV7 9AJ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18566431, N'EAST ANGLIAN AIR AMBULANCE TRADING LTD', NULL, N'Hangar D', N'Gambling Close', N'Norwich Airport', NULL, N'Norwich', N'Norfolk', N'NR6 6EG', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18679520, N'VLADIMIR JANCO', NULL, N'Pod Hajom 1092/73', NULL, NULL, NULL, N'Dubnica Nad Vahom', N'! - Unclassified', N'018 41', N'SLOVAKIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (18758752, N'BIO-LAYER PTY. LIMITED', NULL, N'U 4 26 Brandl St', NULL, NULL, NULL, N'Eight Mile Plains', N'Qld', N'4113', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (19893740, N'THE ECONOMIST', NULL, N'25 St Jamess St', NULL, NULL, NULL, N'London', N'London', N'SW1A 1HA', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (20104719, N'RAMOS LICLA ROSALINO ALEJANDRO', NULL, N'Av. Paseo De La Republica No 395 Int. 101', NULL, NULL, NULL, N'La Victoria', N'Peru - Lima', N'13', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (20414875, N'M & C TECHGROUP GMBH', NULL, N'Rehhecke Strasse 79', NULL, NULL, NULL, N'Ratingen', NULL, N'40885', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (21602364, N'FUJIFILM', NULL, N'Fujifilm House, Boundary Way', NULL, NULL, NULL, N'Hemel Hempstead', N'Hertfordshire', N'HP2 7RH', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (21624508, N'THE NEWBURY GROUP LIMITED', NULL, N'Winchcombe House 123-126 Bartholomew Street', NULL, NULL, NULL, N'Newbury', N'Berkshire', N'RG14 5BN', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (21661059, N'PRESSPAHN LIMITED', NULL, N'Wharncliffe Works Harrogate Road', NULL, NULL, NULL, N'Bradford', N'West Yorkshire', N'BD2 3TB', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (23001545, N'VAISON MATERIAUX', NULL, N'Qu Champ Ferrand', N'Route De Malaucene', NULL, NULL, N'Vaison La Romaine', N'Vaucluse', N'84110', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (24072498, N'GIE SCANNER PAYS CAUX - VALLEE SEINE', NULL, N'19 Avenue Rene Coty', NULL, NULL, NULL, N'Lillebonne', N'Seine Maritime', N'76170', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (24372401, N'STAEL 2005', NULL, N'Chemin Du Manoir', N'Av F Roussel Prolongee', NULL, NULL, N'Croix', N'Nord', N'59170', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (24760604, N'KFKH CHERNIKOVA V V', NULL, N'12 Ul.oktyabrskaya', NULL, NULL, NULL, N'P Vasilkovo', NULL, N'238010', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (25104700, N'ACETELEC', NULL, N'Zone Industrielle De La Briqueterie', N'5 Allee Du Bois De La Grange', NULL, NULL, N'Canejan', N'Gironde', N'33610', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (26354995, N'G.L. KAYSER IMMOBILIEN GMBH', NULL, N'Robert-bosch-str 35', NULL, NULL, NULL, N'Mainz', NULL, N'55129', N'GERMANY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (27477517, N'ELMATEC - INSTALAÇÕES REDES GAS E CLIMATIZAÇÃO, LDA', NULL, N'Estrada Nacional 109', NULL, NULL, NULL, N'Regueira De Pontes', N'Portugal - Leiria', N'2415-180', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (28477215, N'S.N.E. GONZALEZ', NULL, N'Che De La Briqueterie', N'5 Allee Du Bois De La Grange', NULL, NULL, N'Canejan', N'Gironde', N'33610', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (28685847, N'M.J.J.L. - PRONTO A VESTIR, LDA', NULL, N'Rua De Campolide, 351 Loja 1.47', NULL, NULL, NULL, N'Lisboa', N'Portugal - Lisboa', N'1070-034', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (28884911, N'JUGOMETAL A.D.', NULL, N'Bulevar Mihajla Pupina 117', NULL, NULL, NULL, N'Novi Beograd', N'! - Unclassified', N'11070', N'SERBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (29347182, N'GERARDO & FERREIRA, LDA', NULL, N'Urbanização São Bento, Lote 2 R/c', NULL, NULL, NULL, N'Coimbra', N'Portugal - Coimbra', N'3045-120', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (30264519, N'CARRIERES SUD DROME', NULL, N'Quartier Le Besson', NULL, NULL, NULL, N'St Romain En Viennois', N'Vaucluse', N'84110', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (31050467, N'LEPOUTRE COPRO', NULL, N'Av F Roussel Prolongee', NULL, NULL, NULL, N'Croix', N'Nord', N'59170', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (31601767, N'BOUW- EN AANNEMERSBEDRIJF G.TH. VAN SCHEPPINGEN B.V.', NULL, N'Meeuwenlaan 124', NULL, NULL, NULL, N'Amsterdam', N'Noord-holland', N'1021 JN', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (32135529, N'GEBROEDERS DE HAAN-BUSSLOO B.V.', NULL, N'Bussloselaan 28', NULL, NULL, NULL, N'Voorst Gem. Voorst', N'Gelderland', N'7383 AG', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (33058980, N'ASSI B DIRECT INSURANCE SRL', NULL, N'Via Del Lido 104', NULL, NULL, NULL, N'Latina', N'Latina', N'04100', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (33362902, N'PRZEDSIEBIORSTWO HANDLOWE RUR PROFIL S C ZBIGNIEW SZYMANSKI BOZENA SZYMANSKA', NULL, N'Ul. Warszawska 172', NULL, NULL, NULL, N'Pabianice', N'! - Unclassified', N'95-200', N'POLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (34468529, N'LUKARNA DEKARSTWO LUKASZ SZYMANSKI', NULL, N'Ul. Warszawska 172a', NULL, NULL, NULL, N'Pabianice', N'! - Unclassified', N'95-200', N'POLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (37596965, N'GPS STANDARD ENGINEERING SRL', NULL, N'Frazione Arnad Le Vieux 47', NULL, NULL, NULL, N'Arnad', N'Aosta', N'11020', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (37949049, N'BEVERLY HILLS DI DE FRAIA ROSANNA', NULL, N'Corso Italia 124', NULL, NULL, NULL, N'Quarto', N'Napoli', N'80010', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (39203976, N'TRENACO SA', NULL, N'Quai Des Bergues 29', NULL, NULL, NULL, N'Genève', N'Switzerland - Genève', N'1201', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (39479173, N'ALQUILERES MARIA AUXILIADORA SL.', NULL, N'Avenida Andalucia 23 - Bj', NULL, NULL, NULL, N'Cullar Vega', N'Granada', N'18195', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (39656676, N'ELANTEAM SA', NULL, N'Largo Libero Olgiati 75a', NULL, NULL, NULL, N'Giubiasco', N'Switzerland - Ticino', N'6512', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (40162108, N'CAPROSS 2004 SL', NULL, N'Avenida Pintor Felo Monzon 24 - Ed 18', NULL, NULL, NULL, N'Las Palmas De Gran Canari', NULL, N'35019', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (40634795, N'FRANCES BAÑON MIGUEL ANGEL', NULL, N'Carretera De Villena', NULL, NULL, NULL, N'Yecla', N'Murcia', N'30510', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (40769498, N'DE RUYTER TRAINING & CONSULTANCY B.V.', NULL, N'Oosterhavenweg 22-24', NULL, NULL, NULL, N'Vlissingen', N'Zeeland', N'4382 NL', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41218290, N'REWEST AG', NULL, N'C/o Viktor Burri Ag Architekten', N'Militärstrasse 9a', NULL, NULL, N'Thun', N'Switzerland - Bern', N'3600', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41231209, N'AGPER ECONOMISTES I ADVOCATS SLP.', NULL, N'Calle Montserrat 22 - Bj', NULL, NULL, NULL, N'Sabadell', N'Barcelona', N'08201', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41300699, N'VIKTOR BURRI AG ARCHITEKTEN', NULL, N'Militärstrasse 9a', NULL, NULL, NULL, N'Thun', N'Switzerland - Bern', N'3600', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41416801, N'POTÊNCIA CONSTANTE, LDA', NULL, N'Urbanização São Bento, Lote 2 R/c Esq.', NULL, NULL, NULL, N'Coimbra', N'Portugal - Coimbra', N'3045-120', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41600070, N'SWISS HOSPITALITY COMMUNICATIONS AG', NULL, N'Rosenbergweg 10', NULL, NULL, NULL, N'Zug', N'Switzerland - Zug', N'6300', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41624371, N'TOPWAYS SA', NULL, N'C/o Confinanz Sa Succursale Di Giubiasco', N'Largo Libero Olgiati 75a', NULL, NULL, N'Giubiasco', N'Switzerland - Ticino', N'6512', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (41772945, N'EITRA SL', NULL, N'Calle Montserrat 22 - 26', NULL, NULL, NULL, N'Sabadell', N'Barcelona', N'08201', N'SPAIN')

    GO

    print 'Processed 100 total records'

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (42997408, N'METRO OOO', NULL, N'86 Prospekt Im V.i. Lenina', NULL, NULL, NULL, N'Volgograd', NULL, N'400005', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (43571792, N'PEMOFRAN SL', NULL, N'Avenida Andalucia 23', NULL, NULL, NULL, N'Cullar Vega', N'Granada', N'18195', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (43674781, N'KRETSLOPPSPARKEN KRISTIANSTAD AB', NULL, N'Annedalsvägen 20', NULL, NULL, NULL, N'Kristianstad', N'Sweden - Sküne', N'SE-291 63', N'SWEDEN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (45108900, N'ALFA TRAFIKKSKOLE OG EIENDOM AS', NULL, N'Pakkhusgata 1c', NULL, NULL, NULL, N'Årnes', N'Akershus', N'2150', N'NORWAY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (46193896, N'FMIC HOLDING AG', NULL, N'C/o Alexander Wyss', N'Rosenbergweg 10', NULL, NULL, N'Zug', N'Switzerland - Zug', N'6300', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (46311254, N'TORGOIL OOO', NULL, N'86 Kv.708 Prospekt Im V.i.lenina', NULL, NULL, NULL, N'Volgograd', NULL, N'400005', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (46507405, N'KIFISSOS MALL S.A.', NULL, N'2-4 Messogeion Ave', NULL, NULL, NULL, N'Athens', N'! - Unclassified', N'115 27', N'GREECE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (47388268, N'SPOLECENSTVI VLASTNIKU DOMU 9. KVETNA C. P. 797 A 798 V LITOMYSLI', NULL, N'9. Kvetna C. P. 798', NULL, NULL, NULL, N'Litomysl-mesto', N'! - Unclassified', N'570 01', N'CZECH REPUBLIC')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (47447950, N'SPOLECENSTVI VLASTNIKU DOMU 9. KVETNA C. P.808, LITOMYSL', NULL, N'9. Kvetna C. P. 808', NULL, NULL, NULL, N'Litomysl-mesto', N'! - Unclassified', N'570 01', N'CZECH REPUBLIC')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (47632880, N'ZEPTER INTERNATIONAL D.O.O.', NULL, N'117 Bulevar Mihajla Pupina', NULL, NULL, NULL, N'Novi Beograd', N'! - Unclassified', N'11070', N'SERBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (47924963, N'BUSINESS ALTERNATIVA OOO', NULL, N'13, Korp.4, Ul.flotskaya', NULL, NULL, NULL, N'Moscow', NULL, N'125581', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (47992460, N'BUSINESS TREVEL SOLYUSHNS OOO', NULL, N'13, Korp.4, Kv.556, Ul.flotskaya', NULL, NULL, NULL, N'Moscow', NULL, N'125581', N'RUSSIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (49580309, N'ARIAGÁS - COMÉRCIO E DISTRIBUIÇÃO DE GÁS, LDA', NULL, N'Estrada Nacional 109, Edifício Carmosil', NULL, NULL, NULL, N'Regueira De Pontes', N'Portugal - Leiria', N'2415-180', N'PORTUGAL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (49638462, N'PROMOCIONES Y CONSTRUCCIONES GRANMANSION SL.', NULL, N'Calle Hortaleza 34 - 1', NULL, NULL, NULL, N'Madrid', NULL, N'28004', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (51444363, N'OBRAS HERCECA SL', NULL, N'Calle Hortaleza 34', NULL, NULL, NULL, N'Madrid', NULL, N'28004', N'SPAIN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (52645621, N'CAR4YOU ITALIA SRL', NULL, N'Via Giuseppe Mazzini 1/3', NULL, NULL, NULL, N'Rozzano', N'Milano', N'20089', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (52809542, N'MARIE KALATOVA', NULL, N'Fantova 1756/11', NULL, NULL, NULL, N'Praha 13', N'! - Unclassified', N'155 00', N'CZECH REPUBLIC')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (52998585, N'MARIE SVECOVA', NULL, N'Fantova 1761/1', NULL, NULL, NULL, N'Praha 13', N'! - Unclassified', N'155 00', N'CZECH REPUBLIC')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (53829306, N'EV RÉSIDENCES SUISSE SA', NULL, N'Quai Des Bergue 29', NULL, NULL, NULL, N'Genève', N'Switzerland - Genève', N'1201', N'SWITZERLAND')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (54427066, N'ROGANTE SRL', NULL, N'Via Campiglione 20', NULL, NULL, NULL, N'Fermo', N'Ascoli Piceno', N'63023', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (54451696, N'PETER JANCO - PE - CO', NULL, N'Pod Hajom 1081/36', NULL, NULL, NULL, N'Dubnica Nad Vahom', N'! - Unclassified', N'018 41', N'SLOVAKIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (62735455, N'GUINNESS NORTHERN COUNTIES LTD', NULL, N'Bower House', N'Unit 1 Stable Street', N'Hollinwood', NULL, N'Oldham', N'Lancashire', N'OL9 7LH', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (63094156, N'ABBEY LANE FINANCIAL ASSOCIATES LTD', NULL, N'15 Chapel Street', N'Woodhouse', NULL, NULL, N'Sheffield', N'South Yorkshire', N'S13 7JL', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (63436763, N'FRF TOYOTA', NULL, N'1193 Neath Road', N'Plasmarl', NULL, NULL, N'Swansea', N'West Glamorgan', N'SA6 8JT', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (63715088, N'BUSINESS OF SOFTWARE LTD', NULL, N'Newnham House', N'Cambridge Business Park', NULL, NULL, N'Cambridge', N'Cambridgeshire', N'CB4 0WZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (63847685, N'CARSTAR (LEEDS) LTD', NULL, N'100-106 Bradford Road', N'Stanningley', NULL, NULL, N'Pudsey', N'West Yorkshire', N'LS28 6UR', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (63954497, N'EAST ANGLIAN AIR AMBULANCE', NULL, N'Gambling Close', NULL, NULL, NULL, N'Norwich', N'Norfolk', N'NR6 6EG', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (64335204, N'THE RESIDENTIAL CARE HOME', NULL, N'Leigh', NULL, NULL, NULL, N'Sherborne', N'Dorset', N'DT9 6HL', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (64370585, N'ENTERTAINMENT NETWORKS (UK) LTD', NULL, N'Sony Pictures Europe House 25', N'Golden Square', NULL, NULL, N'London', N'London', N'W1F 9LU', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (64418185, N'INTERCLEANSE LTD', NULL, N'Leon House Suite 2', N'3rd Floor', N'233 High Street', NULL, N'Croydon', N'Surrey', N'CR0 9XT', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65121530, N'MOORCROFTS LLP', NULL, N'James House', N'Mere Park', N'Dedmere Road', NULL, N'Marlow', N'Buckinghamshire', N'SL7 1FJ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65563620, N'JOHN BARRY PROPERTIES LTD', NULL, N'The Bungalow', N'Grammar School', N'Battlebarrow', NULL, N'Appleby-in-westmorland', N'Cumbria', N'CA16 6XT', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65643418, N'MOORCROFTS', NULL, N'James House Mere Park', N'Dedmere Road', NULL, NULL, N'Marlow', N'Buckinghamshire', N'SL7 1FJ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65668334, N'SALISBURY COURT RTM CO LTD', NULL, N'Salisbury Court', N'Holland-on-sea', NULL, NULL, N'Clacton-on-sea', N'Essex', N'CO15 5SA', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65723187, N'WEARMOUTH PLANT HIRE LTD', NULL, N'Alderbank', NULL, NULL, NULL, N'Kirkby Stephen', N'Cumbria', N'CA17 4EW', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (65858750, N'ZANREX LTD', NULL, N'Unit 7 Curo Park', N'Park Street', NULL, NULL, N'St. Albans', N'Hertfordshire', N'AL2 2DD', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (66560486, N'M.R. STAIGER GONÇALVES & GONÇALVES LTDA ME.', NULL, N'Av. Souza Naves 131', NULL, NULL, NULL, N'Ibipora', N'Brazil - Parana', N'86200-000', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (66725078, N'COMERCIAL ZANAO PRODUTOS NATURAIS LTDA ME', NULL, N'Av. 20 A 16', NULL, NULL, NULL, N'Rio Claro', N'Brazil - Sao Paulo', N'13506-710', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (67004853, N'MARIA ROSANGELA LEMES ME', NULL, N'Av. Souza Naves 136', NULL, NULL, NULL, N'Ibipora', N'Brazil - Parana', N'86200-000', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (68075553, N'COMERCIAL ATACADISTA ZIAT LTDA. ME.', NULL, N'Av. 20-a 16', NULL, NULL, NULL, N'Rio Claro', N'Brazil - Sao Paulo', N'13506-710', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (70255480, N'GOMEZ JAIMES RIGOBERTO', NULL, N'Calle 74 A 70b 08', NULL, NULL, NULL, N'Bogota', NULL, N'909', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (71971655, N'FRENCH', NULL, N'The Old Vicarage Leigh', NULL, NULL, NULL, N'Sherborne', N'Dorset', N'DT9 6HL', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (72167846, N'CRIMSCOTT CONSULTANCY LTD', NULL, N'1 Dock Offices', N'Surrey Quays', NULL, NULL, N'London', N'London', N'SE16 2XU', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (72529245, N'CENTRAL DE COMERCIO LTDA', NULL, N'Calle 18 9 79 Of 514', NULL, NULL, NULL, N'Bogota', NULL, N'125', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (72656211, N'DRS TECHNOLOGIES UK LTD', NULL, N'Lynwood House', N'Farnham Trading Estate', NULL, NULL, N'Farnham', N'Surrey', N'GU9 9NN', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (72807847, N'INTACEPT CLEANING LIMITED', NULL, N'Security House Vicarage Farm Rd', NULL, NULL, NULL, N'Peterborough', N'Cambridgeshire', N'PE1 5TP', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (73859359, N'KS HOLDING AB', NULL, N'Ulvsundavägen 106c', NULL, NULL, NULL, N'Bromma', N'Sweden - Stockholm', N'SE-168 67', N'SWEDEN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (74998503, N'TRAVEL DESIGN I STOCKHOLM AB', NULL, N'Ulvsundavägen 106', NULL, NULL, NULL, N'Bromma', N'Sweden - Stockholm', N'SE-168 67', N'SWEDEN')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (75794132, N'LUNA RIVERA CESAR AUGUSTO', NULL, N'Jr. Paruro No 1288 Int. 7-8', NULL, NULL, NULL, N'Lima', N'Peru - Lima', N'01', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (75924180, N'RAMOS LICLA EDGAR', NULL, N'Av. Paseo De La Republica No 395 Int. 101a', NULL, NULL, NULL, N'La Victoria', N'Peru - Lima', N'13', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (75996449, N'EMPRESA COMERCIALIZADORA E INDUSTRIAL AGROPECUARIA DE OTROS Y DE SERVICIOS MULTI', NULL, N'Jr. Chasquitambo No 571a , Urb. Parque El Naranjal', N'Cajamarca', NULL, NULL, N'Los Olivos', N'! - Unclassified', N'39', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (76157008, N'MARCEGAGLIA DO BRASIL LTDA.', NULL, N'Rod. Br 101 S/nÂş', N'Km 11', NULL, NULL, N'Garuva', N'Brazil - Santa Catarina', N'89248-000', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (76182216, N'GAMBOA PALOMINO MARLINE', NULL, N'Av. Ayacucho Pampa Olivares Mz. K1 Lote 7', NULL, NULL, NULL, N'Chosica', N'Peru - Lima', N'15', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (76364964, N'BALAROTI COMÉRCIO DE MATERIAIS DE CONSTRUÇÃO S/A.', NULL, N'Waldemar Kost 701', NULL, NULL, NULL, N'Curitiba', N'Brazil - Parana', N'81610-100', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (76401041, N'ASESORES PEDAGOGICOS Y EMPRESARIALES GRUPO ASPYE LTDA', NULL, N'Carrera 17 F 70 A 02 Sur', NULL, NULL, NULL, N'Bogota', NULL, N'306', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (76577710, N'COMERCIALIZADORA EL IMPERIO LTDA', NULL, N'Calle 14 7 33 Of 306', NULL, NULL, NULL, N'Bogota', NULL, N'106', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (77255374, N'COMERCIALIZADORA UNIAMERICANA S A', NULL, N'Calle 74 A Bis 70 21', NULL, NULL, NULL, N'Bogota', NULL, N'909', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (77723794, N'RODRIGUEZ VASQUEZ ARGENIS', NULL, N'Calle 14 3 15', NULL, NULL, NULL, N'Bogota', NULL, N'106', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (77810405, N'DISTRIBUIDORA Y COMERCIALIZADORA DE PRODUCTOS ALIMENTICIOS DISCOMERPRAL S A S', NULL, N'Carrera 103 A 17 35 Piso 1', NULL, NULL, NULL, N'Bogota', NULL, N'702', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (77913488, N'CASTANEDA GARZON JOSE IRENARCO', NULL, N'Calle 3 27d 80', NULL, NULL, NULL, N'Bogota', NULL, N'144', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (78127833, N'MOLINA MARCO ANTONIO', NULL, N'Carrera 12 13 22 Ofc 201', NULL, NULL, NULL, N'Bogota', NULL, N'121', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (78138328, N'TRANS PANAMERICANA DE CARGA LTDA', NULL, N'Carrera 28 11 65 Of 312', NULL, NULL, NULL, N'Bogota', NULL, N'146', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (78265622, N'LAGUNA ALBA PABLO EMILIO', NULL, N'Calle 18 9 79 Ofc 514', NULL, NULL, NULL, N'Bogota', NULL, N'125', N'COLOMBIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (78335216, N'CALR INVERSIONES E.I.R.L.', NULL, N'Jr. Paruro No 1288 Int. 7 Barrios Altos', NULL, NULL, NULL, N'Lima', N'Peru - Lima', N'01', N'PERU')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (78749487, N'CAISA CONSULTORES Y SERVICIOS, S.A. DE C.V.', NULL, N'San Francisco No. 1384 Torre B-2', N'Del Valle, Benito Juarez', NULL, NULL, N'Ciudad De Mexico', N'Mexico - Distrito Federal', N'03100', N'MEXICO')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (79125597, N'LADYWELL INVESTMENTS LTD', NULL, N'Ladywell', N'Battlebarrow', NULL, NULL, N'Appleby-in-westmorland', N'Cumbria', N'CA16 6XT', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (79197978, N'WEARMOUTH LTD', NULL, N'Alder Bank', N'Church Brough', NULL, NULL, N'Kirkby Stephen', N'Cumbria', N'CA17 4EW', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (79555890, N'APB PROPERTIES LTD', NULL, N'3rd Floor Leon House Suite 2', N'233 High Street', NULL, NULL, N'Croydon', N'Surrey', N'CR0 9XT', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (79686149, N'MORTI LTD', NULL, N'1 Dock Offices Surrey Quays', NULL, NULL, NULL, N'London', N'London', N'SE16 2XU', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (79989048, N'CARSTAR LEEDS', NULL, N'108 Bradford Road', N'Stanningley', NULL, NULL, N'Pudsey', N'West Yorkshire', N'LS28 6UR', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (80082189, N'UNIVERSAL ANALYTICAL & TESTING INSTRUMENTS LIMITED', NULL, N'Rm 701a 7/f Railway Plaza', N'39 Chatham Rd South', NULL, NULL, N'Tsim Sha Tsui', N'Kowloon', NULL, N'HONG KONG')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (80662600, N'SPEED LINE INTERNATIONAL COMPANY', NULL, N'68/2, 1st Floor', N'Gandhi Gali', NULL, NULL, N'New Delhi', N'Delhi', N'110006', N'INDIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (80817880, N'LOOKWELL INDUSTRIAL LIMITED', NULL, N'14/f Ever Gain Plaza Blk 1', N'88 Container Port Rd', NULL, NULL, N'Kwai Chung', N'New Territories', NULL, N'HONG KONG')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (80826238, N'INTACEPT MANAGEMENT LTD', NULL, N'Security House', N'Vicarage Farm Road', NULL, NULL, N'Peterborough', N'Cambridgeshire', N'PE1 5TP', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (80829310, N'THE NEWBURY GROUP', NULL, N'Winchcombe House', N'123-126 Bartholomew Street', NULL, NULL, N'Newbury', N'Berkshire', N'RG14 5BN', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (81255751, N'UNIVERSAL (HONG KONG) TECHNOLOGY CO. LIMITED', NULL, N'Rm 701a 7/f Railway Plz', N'39 Chatham Rd S', NULL, NULL, N'Tsim Sha Tsui', N'Kowloon', NULL, N'HONG KONG')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (81344888, N'BEACON MORTGAGE PACKAGING LTD', NULL, N'One Globeside', N'Fieldhouse Lane', NULL, NULL, N'Marlow', N'Buckinghamshire', N'SL7 1HZ', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (81690096, N'A MALIK INTERNATIONAL TRADING COMPANY', NULL, N'68 / 2, 1st Floor', N'Gandhi Gali', NULL, NULL, N'New Delhi', N'Delhi', N'110006', N'INDIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (82689419, N'IDSS PTY LTD', NULL, N'L 12 60 Albert Rd', NULL, NULL, NULL, N'South Melbourne', N'Vic', N'3205', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (82840966, N'AURECON AUSTRALIA HOLDINGS PTY LTD', NULL, N'L 12 60 Albert Road', NULL, NULL, NULL, N'South Melbourne', N'Vic', N'3205', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (82970396, N'PORT AUGUSTA HOSPITAL PTY LIMITED', NULL, N'L 50 Governor Phillip Tower 1 Farrer Pl', NULL, NULL, NULL, N'Sydney', N'Nsw', N'2000', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (83093029, N'AGED CARE DIAGNOSTICS PTY LTD', NULL, N'U4 26 Brandl St', NULL, NULL, NULL, N'Eight Mile Plains', N'Qld', N'4113', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (83268226, N'SEAHAMPTON PTY LTD', NULL, N'Governor Phillip Tower L 50 1 Farrer Pl', NULL, NULL, NULL, N'Sydney', N'Nsw', N'2000', N'AUSTRALIA')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (84776362, N'CHRIST''S COLLEGE', NULL, N'Larch Ave', NULL, NULL, NULL, N'Guildford', N'Surrey', N'GU1 1JY', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (84895110, N'AUTOMOBIELBEDRIJF VAN VLOTEN', NULL, N'Meeuwenlaan 128', NULL, NULL, NULL, N'Amsterdam', NULL, N'1021 JN', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (85286995, N'PRESSPAHN LTD', NULL, N'Wharncliffe Works', N'Harrogate Road', NULL, NULL, N'Bradford', N'West Yorkshire', N'BD2 3TB', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (85366480, N'NORTHERN COUNTIES HOUSING ASSOCIATION LTD', NULL, N'Corporate Centre', N'1 Staple Street', NULL, NULL, N'Oldham', N'Lancashire', N'OL9 7LH', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (85384237, N'NIXON INDUSTRIAL DIAMONDS LTD', NULL, N'14 Endermere Road', NULL, NULL, NULL, N'Coventry', N'West Midlands', N'CV6 5RR', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (86320258, N'NIXON INDUSTRIAL DIAMONDS LIMITED', NULL, N'14 Endermere Road Albion Industrial Esta', NULL, NULL, NULL, N'Coventry', N'West Midlands', N'CV6 5RR', N'UNITED KINGDOM')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (86916616, N'MARCEGAGLIA BRASIL', NULL, N'Rod Br 101 Km 11', NULL, NULL, NULL, N'Garuva Sc', NULL, N'89248-000', N'BRAZIL')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87142489, N'VAN DER STERREN TRANSPORT-EN CONTAINERVERHUURBEDRIJF BV.', NULL, N'Bremweg', NULL, NULL, NULL, N'Horst', N'Limburg', N'5961 NE', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87153335, N'GEBROEDERS DE HAAN-BUSSLOO BV.', NULL, N'Bussloselaan', NULL, NULL, NULL, N'Voorst Gem Voorst', N'Gelderland', N'7383 AG', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87297148, N'BENACQUISTA ASSICURAZIONI DI D'' ALFONSO MADDALENA & C. SNC', NULL, N'Via Del Lido 106', NULL, NULL, NULL, N'Latina', N'Lt', N'04100', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87337026, N'ALFA TRAFIKKSKOLE AS', NULL, N'Pakkhusgata 1 C', NULL, NULL, NULL, NULL, N'Akershus', N'2150', N'NORWAY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87365424, N'DE RUYTER TRAINING & CONSULTANCY BV.', NULL, N'Oosterhavenweg', NULL, NULL, NULL, N'Vlissingen', N'Zeeland', N'4382 NL', N'NETHERLANDS')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87505263, N'EDITORIALE DOMUS SPA', NULL, N'Via Gianni Mazzocchi 1/3', NULL, NULL, NULL, N'Rozzano', N'Mi', N'20089', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87595421, N'GPS STANDARD SPA', NULL, N'Via Arnad Le Vieux 47', NULL, NULL, NULL, N'Arnad', N'Ao', N'11020', N'ITALY')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87662630, N'LOOKWELL INDUSTRIAL LTD.', NULL, N'14/f Ever Gain Plaza', N'88 Container Port Rd', NULL, NULL, N'Kwai Chung', N'New Territories', NULL, N'HONG KONG')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (87716958, N'CENTRE HOSPITALIER DE LILLEBONNE', NULL, N'19 Avenue Pres Rene Coty', NULL, NULL, NULL, N'Lillebonne', NULL, N'76170', N'FRANCE')

    INSERT [dbo].[SCC] ([ID], [OrganisationName], [Buildingname], [Address1], [Address2], [Address3], [Address5], [Town], [County], [Postcode], [Country]) VALUES (88498262, N'PFIZER PHARMACEUTICALS', NULL, N'State Road 3 142 1 Km', NULL, NULL, NULL, N'Guayama', NULL, N'00784', N'PUERTO RICO')

    SET IDENTITY_INSERT [dbo].[SCC] OFF

    GO

    print 'Processed 200 total records'

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • We asked specifically (several times) for your expected OUTPUT too.

    In particular, I am unclear on this statement:

    and your task is to add a new column called Site ID and populate it with a unique number to group records that have the same business name and address or no business name and address.

    So if you have 100 of those 200 rows with no business name or address should those all be the same SiteID (say 1)?? or should they be DIFFERENT SiteIDs each? And when new rows are added will they follow the same logic? Oh, and is our task to do a one-off update to fix bad data or is it to provide code that will work during inserts/updates?

    You also mentioned being non-blocking. I am not sure how you are going to accomplish that. If you don't have the SiteID in place how is new data going to get the existing SiteID when it is added? Seems like if you don't block you are guaranteed to get bad data??

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Abu Dina (1/27/2014)


    As requested, sample data below:

    The goal is to dedupe the list of 200 records at Site level. A site being company + address.

    So for that set of data, what should the result look like?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • TheSQLGuru (1/27/2014)


    We asked specifically (several times) for your expected OUTPUT too.

    In particular, I am unclear on this statement:

    and your task is to add a new column called Site ID and populate it with a unique number to group records that have the same business name and address or no business name and address.

    So if you have 100 of those 200 rows with no business name or address should those all be the same SiteID (say 1)?? or should they be DIFFERENT SiteIDs each? And when new rows are added will they follow the same logic? Oh, and is our task to do a one-off update to fix bad data or is it to provide code that will work during inserts/updates?

    You also mentioned being non-blocking. I am not sure how you are going to accomplish that. If you don't have the SiteID in place how is new data going to get the existing SiteID when it is added? Seems like if you don't block you are guaranteed to get bad data??

    Okay I will add the expected result set tomorrow morning but to be fair it's not going to help much.

    It's really about finding duplicate entries within the record set. A duplicate in this case is at site/business level.

    Same company same address = duplicate

    No company but with same address = duplicate

    Order the result set by company name and the duplicates will seem obvious.

    Oh and There no records with no company/address details.

    The output can be as simple as a two columns of ID, duplicate_id

    Thanks.

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

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

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