> > staffid:int=0 > > <dtml-if "staffid > 0"> > where staffid=<dtml-sqlvar staffid type=int> > </dtml-if> > This works for me: <dtml-if "_.int(staffid) > 0"> where staffid=<dtml-sqlvar staffid type=int> </dtml-if> I do not know why the cast is necessary, though ;) Regards, Stefan -- Things work better when plugged in.