Home » Developer & Programmer » Reports & Discoverer » Remove a space from concatenate report
Remove a space from concatenate report [message #202172] Wed, 08 November 2006 08:24 Go to next message
Messages: 7
Registered: October 2006
Junior Member

I have to create a file in discoverer for loading into an external database. I have created a report and am now preparing the output via concatenating certain fields.

This is a view of my calculation for the output:

Person Reference||TO_CHAR(Hours,'00000')||"Date-YYYYMMDD"||Dept_No

However when i view the output of this, there is a space between the person ref and the hours field. Is this something to with the to_char function im using? the output looks like this:

210031 005802006102801

I would like to drop this space, anyone know how?
thanks in advance,

Re: Remove a space from concatenate report [message #202210 is a reply to message #202172] Wed, 08 November 2006 14:38 Go to previous message
Messages: 21148
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Two options from my point of view: first requires another function: TRIM; this part of the statement would then be

TRIM(TO_CHAR(hours, '00000))

Another solution is use of LPAD function, which would then replace both TRIM and TO_CHAR:

LPAD(hours, 5, '0')
Previous Topic: sequence in report runtime
Next Topic: new report for oracle application : insert data from table A to Table B
Goto Forum:

Current Time: Tue Aug 22 08:13:00 CDT 2017

Total time taken to generate the page: 0.04539 seconds