Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Msandlana
Starting Member
33 Posts |
Posted - 2008-01-29 : 09:38:10
|
| Hi All I have the dbo.OperatingHour It has many duplicates and I want to remove duplicates permanentlyThe statement below works but when I open the table there are no changesInsert into OperatingHour(Weekdays, Wednesdays, Fridays,Saturdays, [Sundays/Public Holidays])(SELECT DISTINCT Weekdays, Wednesdays, Fridays,Saturdays, [Sundays/Public Holidays] FROM OperatingHour) |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-01-29 : 09:40:19
|
SELECT DISTINCT Weekdays, Wednesdays, Fridays,Saturdays, [Sundays/Public Holidays] INTO #Temp FROM OperatingHourGOTRUNCATE TABLE OperatingHourGOINSERT OperatingHour (Weekdays, Wednesdays, Fridays,Saturdays, [Sundays/Public Holidays])SELECT Weekdays, Wednesdays, Fridays,Saturdays, [Sundays/Public Holidays] FROM #TempGODROP TABLE #TempGO E 12°55'05.25"N 56°04'39.16" |
 |
|
|
Msandlana
Starting Member
33 Posts |
Posted - 2008-01-29 : 10:18:21
|
| thanks peso |
 |
|
|
|
|
|
|
|