Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return a scalar value from SQL Server 2000 UDF
Message
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Return a scalar value from SQL Server 2000 UDF
Miscellaneous
Thread ID:
01053027
Message ID:
01053027
Views:
50
Hello All, could someone please help me out here, how do I call the SQL Server 2000 function below using C# and ADO.Net, I've tried treating it like a stored proc but without success
FUNCTION ResolveToMaster (@cUnknown varchar(10))  
RETURNS varchar(10)
AS 
begin


declare @MasterRef varchar(10)

select @MasterRef = null


select  @MasterRef = (Select Distinct MasterRef from Claim where MasterRef =  @cUnknown)

if @MasterRef is null
begin
	select  @MasterRef = (Select Distinct MasterRef from  Claim where CustomerRef =  @cUnknown)
	
end

if @MasterRef is null
	begin
		select  @MasterRef = (Select Distinct MasterRef from Claim where ClaimRef =  @cUnknown)
		
	end


Return @MasterRef
end
what I'm trying to achieve here is, to allow a user to enter either of three different numbers and resolve the number to a master reference ( their idea not mine !?? )
Regards,
Peter J. Kane



Pete
Next
Reply
Map
View

Click here to load this message in the networking platform