Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locating records
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00951096
Message ID:
00951147
Views:
8
>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 IndexSeek() or a SQL Select.
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform