Re: Puzzled by SQL...........can you help
Posted in 1998
Paul Roberts — — source: Informix-list mailing list archive (1991-1998)
In article <6o2vmu$93p$1@news.xmission.com>, Kathy Hildebrand <khildebrand@HTSCM.com> wrote: > >Can anyone get me an alternative to this SQL statement (it won't work). >It doesn't like the LENGTH function in the brackets but I need to cut >off the length of my first concatenated field. Any Ideas? > > >select cost_ctr_code [1,LENGTH(cost_ctr_code)] || ", " || cost_ctr_name >from costctr > > >Kathy Hildebrand >kathy@htscm.com <mailto:kathy@htscm.com> > :-) >Designer/Programmer Kathy: Try select trim(cost_ctr_code) || ", " || cost_ctr_name from costctr ... I think that will do it. - Paul (not a spokesman. Do you suppose the Zapatistas could use a snr. programmer/analyst?)