Page 1 of 1

varstrlst

Posted: Wed Dec 06, 2000 10:15 am
by sfcoordinates
I have a table with a field defined as a varstrlst

I am able use likep to match the whole field or part of the field starting from the beginning. However I am having difficulty in my SQL statement being able to use likep to pick uo any of the sub_items in the list.

If I have a variable with an item name $myitem, I am using a where statement in my SQL to limit the search on the item field as follows:

sql etc etc etc...
where item likep $myitem

What I am looking for is a simple strategy that can be used in the SQL statement that would treat the whole varstrlst like a string and allow me to use a Metamorph Inverted index like I would use in a string.

Thanks

varstrlst

Posted: Wed Dec 06, 2000 12:19 pm
by Kai
This should work, assuming $myitem is a valid Metamorph query and the varstrlst items are inserted correctly. What version of Texis are you using (the date printed by texis -version)?

varstrlst

Posted: Wed Dec 06, 2000 10:41 pm
by sfcoordinates
Kai

The version is Commercial Server Version 3.01.966463564 of Aug 16

Marc

varstrlst

Posted: Thu Dec 07, 2000 10:52 am
by Kai
There's no known problems with varstrlst in that version that would affect indexing or your query. A Metamorph query on a varstrlst field should always treat the whole list as one string.

Are you delimiting strings, ie. to insert the 3 values 'one', 'two' and 'three' as 1 row, you insert 'one|two|three|' (eg. '|' is the delimiter here)? What is the exact Metamorph query for $myitem, and what is an exact value of a row that is expected to match but doesn't?

varstrlst

Posted: Thu Dec 07, 2000 2:37 pm
by sfcoordinates
Kai

It is working now.

Thanks

Marc