0

I imported and excel sheet in SQL Server named DimTime and the date is not in the proper order from 2005 to 2025. So I had to use

select * from dbo.DimTime 
order by Date.

The results present that the first 5900 rows are NULL and the following are in proper date order starting from 2005 to 2025.

But when I use this simple query, it doesnt work.

delete top (5900) from dbo.DimTime
order by Date

Thanks!

Beau

BA82283
  • 251
  • 4
  • 9
  • 22

1 Answers1

2

You could use:

DELETE FROM dbo.DimTime
WHERE col IS NULL

Presuming all NULL rows need to go.

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134