[Fwd: Re: Puzzled by SQL...........can you help]
Posted in 1998
This is a multi-part message in MIME format. --------------764E15C45E03 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit sorry folks! I didn't get the problem right. Vj --------------764E15C45E03 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Received: from mh2.sprynet.com (mh2.sprynet.com [165.121.1.53]) by m6.sprynet.com (8.8.5/8.8.5) with ESMTP id QAA29946 for <rambabu@m6.sprynet.com>; Thu, 9 Jul 1998 16:17:52 -0700 (PDT) Received: from iiug.iiug.org (www.iiug.org [206.175.175.254]) by mh2.sprynet.com (8.8.5/8.8.5) with ESMTP id QAA23219 for <rambabu@sprynet.com>; Thu, 9 Jul 1998 16:17:50 -0700 (PDT) Received: (from majordom@localhost) by iiug.iiug.org (8.7.5/8.7.3) id QAA16716; Thu, 9 Jul 1998 16:00:18 -0500 (CDT) Received: from m6.sprynet.com (m6.sprynet.com [165.121.1.89]) by iiug.iiug.org (8.7.5/8.7.3) with ESMTP id QAA16701 for <informix-list@iiug.org>; Thu, 9 Jul 1998 16:00:09 -0500 (CDT) Received: from vijay.angelobrothers.com ([38.230.72.25]) by m6.sprynet.com (8.8.5/8.8.5) with SMTP id NAA01991 for <informix-list@iiug.org>; Thu, 9 Jul 1998 13:59:59 -0700 (PDT) Message-ID: <35A52B9A.421F@sprynet.com> Date: Thu, 09 Jul 1998 16:44:10 -0400 From: "Vijay R. Anisetti" <rambabu@sprynet.com> X-Mailer: Mozilla 3.0 (Win95; I) MIME-Version: 1.0 To: Informix mailing list <informix-list@iiug.org> Subject: Re: Puzzled by SQL...........can you help References: <B38C47BC8262D111856400A0C9895BE4067622@cscsacnh.htscm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-informix-list@iiug.org Precedence: bulk Kathy Hildebrand 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 shouldn't the following do the job? SELECT cost_ctr_code[1,1] ||","||cost_ctr_name from costctr; > > Kathy Hildebrand > kathy@htscm.com <mailto:kathy@htscm.com> > :-) > Designer/Programmer Vj --------------764E15C45E03--