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 Quote 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'. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/104778-function-question/#findComment-536693 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.