Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored procedure
Message
From
07/09/2004 20:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/09/2004 18:07:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00940107
Message ID:
00940144
Views:
20
>Hi Hilmar
>
SELECT IIF(not table='CUSTPAYMENT',999999999999,newid('CUSTPAYMENT')) as nextid ;
>	FROM ids WHERE table='CUSTPAYMENT' INTO CURSOR tNextId
I don't know why the SP gets executed twice.

How about a two-step selection, would that solve the problem?
SELECT (fieldlist) from ids where WHERE table='CUSTPAYMENT';
  INTO CURSOR tNextId nofilter
select *, IIF(not table='CUSTPAYMENT',999999999999,newid('CUSTPAYMENT')) as nextid;
  from tNextId into cursor tNextId
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform