SACEGO PROBLEM
Posted in 1993
I have this sacego report for which I would like to run a select based upon the
value in the 9th position of a char(9) field.
Let say the value in the field is "B0826.00A"
^ this is what I want to select.
I would like this to be dynamic enough to allow input from user as to what
letter to search for (i.e., [A-Z]). I would like to define an input variable
and prompt the user for the value to search for.
This is what I want to work which doesn't:
select col_1,col2,col_3
from table_1
where col_1 matches "*$input_var"
This is what works
select col1,col2,col_3
from table_1
where col_1 matches "*A"
I have also tried "where col-1[9,9] = "$input_var", which doesn't work either.
I can work around this problem by gathering all the data,sorting by col_1[9,9]
and then checking for the value before printing; but, it doesn't seem efficient.
We have Informix Tech Support and their response is, "Informix can't handle it,
because of the 'matches' statement doesn't allow input variables". Hmmm.
Anyone, have any suggestions?
Thanks,
Bob Beaulieu
bob@netcom.com
--
=============================================================
Bob Beaulieu bobb@netcom.com
San Jose, CA (408) 978-0818
=============================================================