I have an SQL query (generated by LINQ to Entities) which is roughly like the following:
SELECT * FROM [mydb].[dbo].[employees]
JOIN [mydb].[dbo].[industry]
You should try below code also
Insert the records into temporary table Without using the Order by clause
SELECT * into #temp FROM [mydb].[dbo].[employees]
JOIN [mydb].[dbo].[industry]
ON jobs.industryId = industry.id
JOIN [mydb].[dbo].[state]
ON jobs.stateId = state.id
JOIN [mydb].[dbo].[positionType]
ON jobs.positionTypeId = positionType.id
JOIN [mydb].[dbo].[payPer]
ON jobs.salaryPerId = payPer.id
JOIN [mydb].[dbo].[country]
ON jobs.countryId = country.id
WHERE countryName = 'US'
Now run the statement using Order By Clause
Select * from #temp ORDER BY startDatetime