>I have a stored procedure on a DBC which is invoked by triggers on a table when somebody updates. What I would like to do though is the stored procedure will only execute if the record contains particular values in the key field. Basically in my table every record has whats known as a mainkey: For example
>
>Mainkeys
>--------
>T59*SS2005*JSK034*SAMPLE
>CLASSIC*SS2004*JSK213*SAMPLE
>or
>T56*SS2003*JST098*SAMPLE
>
>What I want to do is that the procedure will only run if 'SS2004' or 'SS2005' is in the mainkey field. I need something like:
If you want any kind of performance you might consider creating an index e.g.
Index On StrExtract(MainKey,"*SS200","*") $ "45" Tag RowsIWant
And then you could use:
Set Order To RowsIWant
Seek(.T.)
Or a filtered Index e.g.
Index On AnyField Tag RowsIWant For StrExtract(MainKey,"*SS200","*") $ "45"
And for the filtered index simply use:
Set Order To RowsIWant
censored.