Re: Concatenation operator in embedded SQL statements in 4GL
Posted in 1997
Topics: Performance & Tuning, Connectivity: ESQL/C, 4GL & Embedded SQL
Joseph Cullipher wrote: > > I ran into the same problem a few months back. When I called tech support > they told me that was the way it was designed to behave and not a bug. > (I have version 6.00). They also mentioned that there were no plans to > change it to work. So I guess we will just have to do the prepares/declares/ > open/fetch/close/free stuff every time we want to concatonate something. > > On Mon, 9 Jun 1997, Jacob Salomon wrote: > > } I just tried the following in a 4GL program: > } > } select col1 || col2 > } into myvariable > } from some_table > } > } The 4GL compiler actually generated a syntax error for this! >;-( I had > } to go through the PREPARE/DECLARE/OPEN/FETCH rigmarole. You lazy bunch of programmers! You should ALWAYS use PREPARE for SQL commands. Good practice, good performance, engine features. :-) Cheers, -- Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+