>I want to have an SQL statement that will allow an IIF that can accept up to 2 digits.
>
>SELECT *, ;
> IIF( INLIST( nUserSecurityLevel, 1, 2, 3 ), nUserSecurityLevel, 99 ) AS ; nUserLvl ;
> FROM ;
> UserSecurity
>
>If the first row evaluates to a 1, 2, or 3, then I will get an overflow when the IIF evaluates to a 99 later. How can I force the column width to be 2 digits and avoid this problem.
>
>TIA
>
>Dan
SELECT *, ;
IIF( INLIST( nUserSecurityLevel, 1, 2, 3 ), nUserSecurityLevel+00, 99 ) AS ; nUserLvl ;
FROM ;
UserSecurity
Edward Pikman
Independent Consultant