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:
00951110
Views:
8
Neil,
You can write a function that & put it as Update Triger of the table, something like that:
USE YourTable EXCLUSIVE
MODIFY STRUCTURE
*go to page Table & put following in Update Triger
IIF(SUBSTR(MainKey,AT('*',mainkey)+1,6)$("SS2004SS2005"), YourFunctionName(), .t.)
Don't forget Your function must return a logical value.






>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 AT('*',mainkey)$("SS2004SS2005")
>
>So basically it locates the season after the first asterisk and determines whether the next 6 characters being 'SS2005' is contained wihin the mainkey field.
>
>In the example above it would execute for the first 2 mainkeys but not for the third if my syntax was correct.
>
>Can anybody help me please
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform