[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Unofficial UNIT-e Forum • TVF_GetCodeRef
Page 1 of 1

TVF_GetCodeRef

Posted: Thu Mar 02, 2017 10:59 pm
by robinwilson16
Returns the code reference for the selected lookup

Code: Select all

CREATE FUNCTION [dbo].[TVF_GetCodeRef](@Code VARCHAR(10),@Domain VARCHAR(25))
RETURNS TABLE

AS

RETURN 
	SELECT
		Value = VC.vc_ref
	FROM 
		ulive.dbo.caps_valid_codes VC
	WHERE     
		VC.vc_domain = @Domain 
		AND vc_code = @Code