ExecuteSQLit sql=
create temporary table tmp1 as select TabID from Tabs where ParentId='$iPrm' and ProjectID in ('0','') and (AuthorizedRoles='' or instr(AuthorizedRoles, 'X;')>0) and isVisible=1 and isDeleted=0 and Title<>""

Truncated incorrect DECIMAL value: '$iPrm'