SELECT pl.listId, pl.listName, pl.listType, pl.detailType, pl.locked, pl.partnerType, pl.createdBy,
pl.dateCreated, pl.lastUpdatedBy, pl.lastUpdatedDate, pl.SharedList, pl.isProcessing, datepart( year, pl.dateCreated ) as yearCreated,
pl.publishDate, pl.unpublishDate, case when getDate() between pl.publishDate and pl.unpublishDate then 'Y' else 'N' end published, coalesce( pl.lastUpdatedDate, pl.dateCreated ) lastUpdatedDate, pl.listUses
FROM tbl_LST_PartnerLists pl with (nolock)
WHERE pl.ownerId = 4036
and pl.ownerType = 'DST'