Hi,
I have a typedlist which i need to include a function in. I have included the current SQL function Below. Is it possible to covert this into a dbFunctionCall within code ? as i cannot call this function direct from SQL (long story). All the required fields are within the typedlist.
This function takes 3 arguments, Date1, Date2 and Requested(Bool). Based on the login below and the supplied parameters Date1 gets set.
Any help would be appreciated.
Thanks Stuart
BEGIN
DECLARE @ReturnVal AS datetime
IF @Date1 IS NULL
BEGIN
IF @Requested=0
SET @ReturnVal=@Date2-21
ELSE
SET @ReturnVal=@Date2
END
ELSE
SET @ReturnVal=@Date1
RETURN @ReturnVal
END