Wildcard and 4gl code
Posted in 2000
I'm running Informix SE 7.2 on an HP9000 390R running HP-UX 10.20. The
4gl code below was written when I was using Informix On-Line 5.0 on an
HP9000, 832 running HP-UX 9.0. This code worked on the old system but
not on the new, i.e. the asterisk would serve as a wildcard on the old
system whereas now it seems to function as an asterisk and none of the
names are asterisk. Can someone tell me what I have to do to get it to
work on the new system?
if (tdata[i].last is null) then
let tdata[i].last = "*"
end if
if (tdata[i].first is null) then
let tdata[i].first = "*"
end if
select count(*) into total from faculty where
(tdata[i].last matches f_last) and
(tdata[i].first matches f_first)
if (total = 1) then
select rowid, f_last, f_first
into rownumber[i], tdata[i].last, tdata[i].first
from faculty
where (tdata[i].last matches f_last) and
(tdata[i].first matches f_first)
end if
if (total = 0) then
call warning(i)
end if
Also, will there ever be an SE 7.3 since I see a lot of changes between
7.2 coding of select statements and 7.3 coding of select statements
according to this newsgroup (see sample below).
SELECT link_id,
CASE
WHEN (CURRENT - date) < INTERVAL (1) DAY TO DAY
THEN "1"
WHEN (CURRENT - date) < INTERVAL (7) DAY TO DAY
THEN "2-7"
ELSE "8-30"
END,
COUNT(*)
FROM jump
WHERE (CURRENT - date) < INTERVAL (30) DAY TO DAY
GROUP BY link_id, 2;
Thanks,
Dick