0 - 1 of 1 tags for shell

Hi,
I am new BTEQ and scripting. I am checking if my source data is updated or not before i am updating my petspace tables.
Sel 1 from SOURCE_TABLE
where cast(CMPGN_RUN_DATE as date)=current_date-1 and TRANS_DATE =current_date-1
group by 1;
.IF ACTIVITYCOUNT = 0 THEN .EXIT 99; -- 99 error code reserved for dependency