Subject Re: [firebird-support] Concaten8ing columns
Author Mitchell Peek
CAST('0' || substring(A.UNIT_ID from 1 for 1) ||'-'|| A.ADMISSION_ID ||'-0'|| A.ADMIT_ORDINAL AS
VARCHAR(16)),



Clay Shannon wrote:

>I need to display pieces of three columns in one column in a grid, so that
>it appears in the format 0N-NNNNN-0N[N]
>
>
>
>I'm trying:
>
>.
>
>CAST('0' || A.UNIT_ID ||'-'|| A.ADMISSION_ID ||'-0'|| A.ADMIT_ORDINAL AS
>VARCHAR(16)),
>
>.
>
>
>
>But what I also need to do is cut off the second number of UNIT_ID, if it
>has one (e.g. '2' becomes '02', and '32', becomes '03' rather than '032')
>
>
>
>How I do dat?
>
>
>
>Clay Shannon,
>
>Dimension 4 Software
>
>
>
>
>
>[Non-text portions of this message have been removed]
>
>
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Visit http://firebird.sourceforge.net and click the Resources item
>on the main (top) menu. Try Knowledgebase and FAQ links !
>
>Also search the knowledgebases at http://www.ibphoenix.com
>
>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>