views:

28

answers:

1

Hi, say I have a scalar-valued function with takes two Guids as parameters:

dbo.CarDistribution

The two Guids area ModelId and AreaId.

The function returns another Guid.

Could someone please explain to me how I call this function within a stored procedure and set the result returned to a variable.

I tried calling it with:

CarDistribution('a Guid in here', 'another Guid in here')

but I get the error 'Incorrect syntax near 'speciesareapresence_eval_internal''

Thanks!

+1  A: 
    declare @NewGUID uniqueidentifier    

    Select @NewGUID = dbo.CarDistribution (ModelId, AreaId)

    From dbo.YourTable
Barry
Great thanks for that!
Mr Cricket