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
izza56
Messages: 7
Registered: October 2006
Junior Member
Hi,

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,

J.
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
Littlefoot
Messages: 21813
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: REP-2147418514: Unable to retrieve a string from the Report Builder message file.
Next Topic: Info Reqd
Goto Forum:
  


Current Time: Tue Jul 02 09:10:04 CDT 2024