Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return a scalar value from SQL Server 2000 UDF
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Return a scalar value from SQL Server 2000 UDF
Divers
Thread ID:
01053027
Message ID:
01053027
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform