TVF_StudentApplicationCreateDate

The list of table valued functions used by Guildford College Reports and any anyone else wishes to share
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
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
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

TVF_StudentApplicationCreateDate

Post by robinwilson16 » Thu Mar 02, 2017 11:56 pm

Displays the created date of the specified student application using the audit data

Code: Select all

CREATE FUNCTION [dbo].[TVF_StudentApplicationCreateDate] (
	@Session VARCHAR(7), 
	@StudentApplicationID numeric(16, 0)
)
RETURNS TABLE
AS
RETURN 
	/*
	DECLARE @Session NVARCHAR(7) = '2015-16'
	DECLARE @StudentApplicationID numeric(16, 0) = 727000028107233
	*/
	--notapplied

	SELECT
		Value = MIN ( SAT.sat_start )
	FROM ulive.dbo.capd_studentapplication SA
	LEFT JOIN ulive.dbo.CAPS_SYSTEM_AUDIT_TRAIL SAT
		ON SAT.sat_id = SA.sa_id	
	WHERE	
		SA.sa_id = @StudentApplicationID

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest