Subject RE: [firebird-support] Concaten8ing columns
Author Clay Shannon
<<CAST('0' || substring(A.UNIT_ID from 1 for 1) ||'-'|| A.ADMISSION_ID
||'-0'|| A.ADMIT_ORDINAL AS VARCHAR(16)),>>

OK, that worked great. Now I need to know how I can append 2 zeros if a
value is 1..9, but only one zero if it is 10..99. I have:

CAST(''0'' || substring(A.UNIT_ID from 1 for 1)||''-''|| A.ADMISSION_ID
||''-0''|| A.ADMIT_ORDINAL AS VARCHAR(16)), ')

But need the last '0' to be two '00s if A.ADMIT_ORDINAL is < 10.

Clay Shannon,
Dimension 4 Software