Select  * from appointment p where p.patnum = <@PATNUM@>