Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL: Internal Error
Message
De
23/01/2004 11:41:30
 
 
À
23/01/2004 11:15:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00869906
Message ID:
00869926
Vues:
15
Hi Fabio,


Yes, that is correct. A few years back, I remember changing (x $ y) into ( at(x, y) > 0).

Since then (vfp3), I never use $ in join or where clauses any more.


>Hi,
>
>Try to use a $ string search like a condition between two tables,
>fire a "SQL: Internal Error"
>
>
>CLEAR
>
>CREATE CURSOR aaa ( id C(1),s1 C(5))
>INSERT INTO aaa VALUES ('a','a')
>INSERT INTO aaa VALUES ('b','ba')
>
>SYS(3054,11)
>ON ERROR ? MESSAGE()
>
>* VFP try to optimize the join, build a temp index for do this,
>* but this operation is impossible,
>* catch it and fire a SQL: Iternal Error
>
>SELECT * FROM aaa t1,aaa t2 WHERE t1.id $ t2.s1
>SELECT * FROM aaa t1 JOIN aaa t2 ON t1.id $ t2.s1
>SELECT * FROM aaa t1 JOIN aaa t2 ON .T. WHERE t1.id $ t2.s1
>
>*  Not optimizable Cartesian Product is ok
>SELECT * FROM aaa t1 JOIN aaa t2 ON t2.s1 LIKE "%"+t1.id+"%"
>SELECT * FROM aaa t1 JOIN aaa t2 ON AT(t1.id,t2.s1)>0
>
>ON ERROR
>SYS(3054,0)
>
>
>Fabio
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform