Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored procedure
Message
De
07/09/2004 20:17:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00940107
Message ID:
00940144
Vues:
19
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform