Untitled
unknown
sql
a year ago
503 B
10
Indexable
DECLARE @lrn NVARCHAR(22) = 'LRN_VALUE.....';
SELECT
tsd.lrn,
status_tsd.tsd_status_id,
status_tsd.validfrom_timestamp,
status_tsd.status_type_id,
tsd_status_type.tsd_status_type_name
FROM
dbo.tsd AS tsd
INNER JOIN
dbo.status_tsd AS status_tsd ON tsd.tsd_id = status_tsd.tsd_id
INNER JOIN
dbo.tsd_status_type AS tsd_status_type ON status_tsd.status_type_id = tsd_status_type.tsd_status_type_id
WHERE
tsd.lrn = @lrn
ORDER BY
status_tsd.validfrom_timestamp DESC;
Editor is loading...
Leave a Comment