brycecaruthers
2/10/2017 - 12:17 AM

Find time zone of tracking lines within lskin

Find time zone of tracking lines within lskin

SELECT l.lskinid, l.refname, l.masterlskin, p.arizona, d.tzadjust
FROM lskin l
	JOIN lskinproperty p ON p.frn_lskinid = l.lskinid
	JOIN dnis d ON d.add_lskinid = l.lskinid
WHERE l.masterlskin = 55719
	AND l.isactive = 1
	AND d.lestatus <> 2
ORDER BY tzadjust
SELECT lednis, dnisid, tzadjust, add_lskinid
FROM dnis
WHERE add_lskinid IN (59681,59683,59682,51870)
ORDER BY add_lskinid asc, tzadjust desc