[comp.databases] Indexing with INFORMIX

litauer@infko.UUCP (Christoph Litauer) (09/06/90)

I need help by a DBMS - problem which I have with the
Informix-SQL Version 2.10.03F on a UNIX system.

DESCRIPTION

I'd implemented a literature-DB with 8 relations.
One of these, the relation "author", has the attributes
"nr" type of integer and "name" type of char(60).
Then I wrote a report. 
In this I define a varible "matchstr" of type
char(60). In the INPUT-section of the report, I read
the variable "matchstr". Then I make a SELECT-statement
in which I compare with the keyword MATCHES the variable
"matchstr" with the values of the attribute "name" and
write the resulting rows into a file defined in the OUTPUT-
section before.
After that I start the report, wait for the input-prompt
and write an authorname.      
In this manner I get all the authors I want. But now ...

THE PROBLEM is:

If I set an index on the attribute "name", start the same
report with the same input and find nothing. The only way
to find authornames with the indexed attribute is to write
the metasign "*" anywhere in the variable "matchstr". Then
I get the same output, if the metasign wasn't expanded, as
before the indexing. 
The Question is: In which way can I get the same output with
indexed attributes as before, without using the metasign "*".

If I use a form which works on the same relation there are no
problems even if there is an index or not.


--
Christoph Litauer, Uni Koblenz (EWH), FB Informatik
		   Rheinau 3-4, D-5400 Koblenz,  Germany
UUCP: ..!unido!infko!litauer  litauer@infko.UUCP