Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed up query
Message
De
22/04/2004 16:13:02
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00897263
Message ID:
00897364
Vues:
12

$ can indeed be used inside a SQL statement.
Please give a specific example where you've had errors using it.


David, I have bugs for all the tastes.

I have post it into a message #?????
CLEAR

CREATE CURSOR aaa ( id C(1),s1 C(1))
INSERT INTO aaa VALUES ('a','a')
INSERT INTO aaa VALUES ('b','b')

SYS(3054,11)
ON ERROR ? '>>>>>>>>>>>>>>>>>>',MESSAGE()
* vfp TRY TO OPTIMIZE THESE, AND GO in a Iternal Error status
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 optimize 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)
David, your comment on the macro is mistaken,
if the select duration is more than 50ms,
then one literal string is faster than a variable one,
and therefore the overload of the substitution of macro it is repay.

But i have found a problem with binary strings, then macro substitution have restriction.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform