Forum Replies Created

Viewing 15 posts - 271 through 285 (of 3,738 total)

  • RE: Can't find downoad of AdentureEWorksDW.mdf

    I thought that I could get away with the 2012 but no luck.

    The following example of Table Partitioning by Year just refers to AdventureWorksDW:

    https://www.toadworld.com/platforms/sql-server/w/wiki/9651.example-of-creating-partitioned-tables

    I thought that it was preferred...

  • RE: Can't attach AdventureWOrkdSW on my PC. It works on the Server

    Well it worked.

    I did change some permissions. I assume that took care of the issue.

  • RE: LEFT JOIN

    There was not a problem with the LEFT JOIN syntax.

    There were duplicates in the Source file which I should have caught. :blush:

    Thanks for all that provided help.:-)

  • RE: Can't find downoad of AdentureEWorksDW.mdf

    I used google as well but I could not find the mdf. I found scripts or later versions then what I wanted.

    Thanks.

  • RE: LEFT JOIN

    Phil Parkin (1/15/2016)


    Welsh Corgi (1/15/2016)


    drew.allen (1/14/2016)


    Welsh Corgi (1/14/2016)


    I need to create a new table that has an Identity Column so that I can delete the duplicates.

    No, you don't. You...

  • RE: LEFT JOIN

    The following inserts 157 records:

    WITH CTE AS (

    SELECT *, ROW_NUMBER() OVER(PARTITION BY ZipCode ORDER BY ZipCode) AS rn

    FROM Postal_Codes_Import

    )

    SELECT *

    INTO #tmp

    FROM CTE

    WHERE rn > 1

    ORDER BY ZipCode

    This returns...

  • RE: LEFT JOIN

    drew.allen (1/14/2016)


    Welsh Corgi (1/14/2016)


    I need to create a new table that has an Identity Column so that I can delete the duplicates.

    No, you don't. You can use a CTE...

  • RE: LEFT JOIN

    drew.allen (1/14/2016)


    Welsh Corgi (1/14/2016)


    Yes there are 3 duplicates when I do a INNER JOIN but I exclude them in the Insert and I keep getting PK Violations. :unsure:

    An INNER JOIN...

  • RE: LEFT JOIN

    Thanks Drew. I tried a SELECT Distinct and it did not work.

    Thanks again.

  • RE: LEFT JOIN

    LinksUp (1/14/2016)


    Welsh Corgi (1/14/2016)


    I need to create a new table that has an Identity Column so that I can delete the duplicates.

    Setting aside the fact that you don't need an...

  • RE: LEFT JOIN

    I need to create a new table that has an Identity Column so that I can delete the duplicates.

  • RE: LEFT JOIN

    Thanks.

    Does anyone have a script that could be adapted to correct the duplicate issue.

  • RE: LEFT JOIN

    The following returns 126 records.

    So the problem is that there arerror in the Import tABLE.

    SELECT ZipCode , COUNT(*) AS RecordCount

    FROM Postal_Codes_Import

    GROUP BY ZipCode

    HAVING COUNT (*) > 1

    I have to...

  • RE: LEFT JOIN

    Jacob Wilkins (1/14/2016)


    Welsh Corgi (1/14/2016)


    I execute the following Query:

    INSERT INTO POSTAL (ID,Latitude, ID.Longitude, CityTownshipID, CountyRegionID,StateProvinceID,CountryID)

    SELECT ZipCode, Latitude, Longitude,CityTownshipID , CountyRegionID, StateProvinceID, CountryID

    FROM Postal_Codes_Import

    WHERE NOT EXISTS (SELECT *

    ...

  • RE: LEFT JOIN

    It was a typo. I removed it and tried to insert but I still get the error listed above when attempting to Execute the Insert.

    INSERT INTO POSTAL (ID, Latitude, Longitude,...

Viewing 15 posts - 271 through 285 (of 3,738 total)