×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I see what you mean. But to do so would require some preanalysis, like
with t1 as (
select max(length(fld1)) as len1,
max(length(fld2)) as len2
from qtemp/jeff)
select substr(fld1,1,len1) as fld1Display,
substr(fld2,1,len2) as fld2Display
from qtemp/jeff,t1
- This doesn't do it though.
And stored procedures can't use a simple select. They have to use a
select into. Which is why the following doesn't work:
create procedure rob/jeff
language sql
begin
declare len1 int;
declare len2 int;
select max(length(fld1)),
max(length(fld2))
into len1, len2
from qtemp/jeff;
select substr(fld1,1,len1) as fld1Display,
substr(fld2,1,len2) as fld2Display
From qtemp/jeff,t1;
end
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.