Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select SQL cursors
Message
 
 
À
26/03/2008 11:45:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01305675
Message ID:
01305712
Vues:
6
>SELECT " " as is_sel,contract, vendor,;
>		   mjclass ,;
>		   mjunclass,;
>		   mjcontnet,;
>		   forclass,;
>		   forunclass ,;
> 		   forcontnet,;
> 		   fornetcost,;
>		   forsupmtl ,;
>		   forother ,;
>		   bondamt ,;
>		   forexwk ;
>	FROM contract;
>	WHERE org=orgfltr;
>	INTO  CURSOR delay1 READWRITE  ORDER BY  contract NOFILTER
>
>	
>CREATE cursor c_group ;
>(is_sel C(2), contract c(13), vendor c(12), ;
> mjclass N(13,2),;
> mjunclass N(13,2),;
> mjcontnet N(13,2),;
> forclass N(13,2),;
> forunclass N(13,2),;
> forcontnet N(13,2),;
> fornetcost N(13,2),;
> forsupmtl N(13,2),;
> forother N(13,2),;
> bondamt N(13,2),;
> forexwk  N(13,2),;
>MJNETCST n(13,2),title C(65),title1 c(30),title2 c(30),title3 c(30))
>
>
>SELECT c_group
>***********************************
>APPEND FROM DBF("delay1")
>
>Append fails at this point and doesn't populate c_group
>
>My fix is
>
>SCAN
>	SCATTER MEMO memv
>	INSERT INTO c_group FROM MEMVAR
>ENDSCAN
Which VFP version you're using, once again?

Couple of points:

1) Add select 0 before CREATE CURSOR

2) Move both NOFILTER and READWRITE (btw, why do you need them both) to the end of select
insert into c_group select " " as is_sel,contract, vendor,;
>		   mjclass ,;
>		   mjunclass,;
>		   mjcontnet,;
>		   forclass,;
>		   forunclass ,;
> 		   forcontnet,;
> 		   fornetcost,;
>		   forsupmtl ,;
>		   forother ,;
>		   bondamt ,;
>		   forexwk ;
>	FROM contract;
>	WHERE org=orgfltr
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform