The stored proc below works on an SQL 2005 db, but doesn't work on SQL 2000.
It errors out on the SELECT line 14. I've tried changing the parens to brackets but that didn't work either.
This is the error:
Msg 170, Level 15, State 1, Procedure sp_SelectRandomEmployees, Line 14
Line 14: Incorrect syntax near '('.
/****** Object: StoredProcedure [dbo].[sp_SelectRandomEmployees]
Script Date: 11/19/2007 07:58:49 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
ALTER PROCEDURE [dbo].[sp_SelectRandomEmployees]
SET NOCOUNT ON;
SELECT TOP (@RndNum) File#, LastName, FirstName, SiteID, Department
ORDER By NEWID()