TVF_GetCodeRef

The list of table valued functions used by Guildford College Reports and any anyone else wishes to share
Post Reply
User avatar
robinwilson16
Site Admin
Posts: 185
Joined: Sun Oct 16, 2016 6:46 pm
Forename: Robin
Surname: Wilson
College Name: FEA
Position: MIS Consultant
LinkedIn Profile: https://www.linkedin.com/in/robinwilson16

TVF_GetCodeRef

Post by robinwilson16 » Thu Mar 02, 2017 10:59 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest