Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure
Message
From
07/09/2004 18:07:48
 
 
To
07/09/2004 18:01:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00940107
Message ID:
00940114
Views:
17
Hi Hilmar
SELECT IIF(not table='CUSTPAYMENT',999999999999,newid('CUSTPAYMENT')) as nextid ;
	FROM ids WHERE table='CUSTPAYMENT' INTO CURSOR tNextId
executes the stored procedure twice even though there is only one record in with table='CUSTPAYMENT'

I have tried with RECNO() also but no success. Maybe I am not understanding you correctly,
do you have an example?

Thanks
Geoff

>Did I understand correctly, that you want to execute the stored procedure only for records that fulfill other criteria?
>
>One way would be to add the stored procedure at the end of a series of AND statements. Shorcut Boolean evaluation should take care of only evaluating the function when the previous conditions are .T.
>
>>Hi
>>
>>How do I create an SQL SELECT statement that uses a stored procedure (or other procedure) so that that procedure is only called when there is a valid record in the when statement.
>>
>>Foxpro currently calls the procedure during the initialisation phase of the select and then again for each row in the WHERE. Is it possible to avoid the initialisation call?
>>
>>Regards
>>Geoff Scott
May all your weeds be wildflowers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform