Re: sql query
Posted in 1999
Christof Koeberlein — — source: Informix-list mailing list archive (1991-1998)
William Downie <william.downie@virgin.net> schrieb in im Newsbeitrag:
7gvfg8$fg4$1@nclient3-gui.server.virgin.net...
> Hi Everyone, A quick question !
>
> If I have a partnum on a table which is char(12) and the part number is
> right justified, so when you do a select statement on the field you get
> prevailing spaces, how do I get rid of the spaces ?
>
> Example
>
> select partnum from prodrec>
> result:
>
> " 6789012"
>
> I need to get the result with no spaces (I cannot alter the table either)
>
> "6789012"
>
Try this:
select trim(partnum) from prodrec
Christof