Jump to content

Recommended Posts

I have a column of UmpireID from Umpire table and would like to randomly select a new umpire that isnt the @UmpireID the user puts in as return value anyone help my atempt below

 

create function dbo.getSecondUmpire 
(@UmpireID)
returns int
as
begin
return (select rand(UmpireID) from Umpire having rand(UmpireID) != @UmpireID)
end

Link to comment
https://forums.phpfreaks.com/topic/104770-udf-question-urgent/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.