varstrlst

Post Reply
sfcoordinates
Posts: 4
Joined: Wed Dec 06, 2000 10:02 am

varstrlst

Post 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
User avatar
Kai
Site Admin
Posts: 1263
Joined: Tue Apr 25, 2000 1:27 pm

varstrlst

Post 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)?
sfcoordinates
Posts: 4
Joined: Wed Dec 06, 2000 10:02 am

varstrlst

Post by sfcoordinates »

Kai

The version is Commercial Server Version 3.01.966463564 of Aug 16

Marc
User avatar
Kai
Site Admin
Posts: 1263
Joined: Tue Apr 25, 2000 1:27 pm

varstrlst

Post 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?
sfcoordinates
Posts: 4
Joined: Wed Dec 06, 2000 10:02 am

varstrlst

Post by sfcoordinates »

Kai

It is working now.

Thanks

Marc
Post Reply