
            with cte as (select dbo.tzGetDate() as curDate)
            select count(PC.PersonCard_id) as "PersonCard_Count"
            from
                v_PersonCard PC
            where PC.Lpu_id = '13101856'
              and (PersonCard_endDate is null or PersonCard_endDate >= (select curDate from cte))
              and LpuAttachType_id = 1
        
