Viewing 15 posts - 271 through 285 (of 3,738 total)
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...
January 18, 2016 at 2:19 pm
Well it worked.
I did change some permissions. I assume that took care of the issue.
January 18, 2016 at 1:57 pm
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.:-)
January 18, 2016 at 1:51 pm
I used google as well but I could not find the mdf. I found scripts or later versions then what I wanted.
Thanks.
January 18, 2016 at 12:14 pm
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...
January 15, 2016 at 7:36 am
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...
January 15, 2016 at 7:15 am
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...
January 15, 2016 at 6:58 am
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...
January 14, 2016 at 4:30 pm
Thanks Drew. I tried a SELECT Distinct and it did not work.
Thanks again.
January 14, 2016 at 4:24 pm
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...
January 14, 2016 at 4:23 pm
I need to create a new table that has an Identity Column so that I can delete the duplicates.
January 14, 2016 at 2:46 pm
Thanks.
Does anyone have a script that could be adapted to correct the duplicate issue.
January 14, 2016 at 2:41 pm
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...
January 14, 2016 at 2:27 pm
Jacob Wilkins (1/14/2016)
Welsh Corgi (1/14/2016)
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 *
...
January 14, 2016 at 2:11 pm
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,...
January 14, 2016 at 1:37 pm
Viewing 15 posts - 271 through 285 (of 3,738 total)