brad12345 Posted May 8, 2008 Share Posted May 8, 2008 how do i create it so the random new UmpireID is different from the @UmpireID create function dbo.getSecondUmpire (@UmpireID int ) returns int as begin return (select TOP 1 UmpireID FROM Umpire order by NEWID() having != @UmpireID ) end Link to comment https://forums.phpfreaks.com/topic/104778-function-question/ Share on other sites More sharing options...
brad12345 Posted May 8, 2008 Author Share Posted May 8, 2008 error im getting Incorrect syntax near the keyword 'having'. Link to comment https://forums.phpfreaks.com/topic/104778-function-question/#findComment-536370 Share on other sites More sharing options...
fenway Posted May 9, 2008 Share Posted May 9, 2008 This is a continuation of this double-post. What NEWID()? TOP 1 is MS-SQL, not MySQL. Link to comment https://forums.phpfreaks.com/topic/104778-function-question/#findComment-536693 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.