How to select upper case fields??? Pleaes help!!! Thx.
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all, I would very much appreciate if anyone could help me with this problem in Informix. I have a form with a field that accept both uppercase and lowercase. This field is a field of type char of course. The problem is that in a construct statement, the search does not pick up both upper case and lowercase. This is because the database could contain both upper and lowercase for this particular field. There are a number of solution to this problem. One way is to make the field execpt only uppercase and go back to the database and upshift all of the datas for that field. This might not be a good solution because this particular field really needs to be both upper and lower case. The other solution I thought of is to modify the where clause of the construct statement to omit this particular field's condition. That way the search will pick up both uppercase and lower case for this field. But it will also pick up every datas in this field regardless of the field's condition. Then use the foreach to filther the data. Foreach cursor into cur_rec. If upshift(cur_rec.field) matches upshift(input_field) then stored the rec. loop ... until done. Is there another solution? Is there a way to upshift in an sql select statement? Upshift is a 4gl function unforunately. If only I could do: select upshift(field) into ...... :( Please help. Thanks in advance.