Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Issue - help
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Issue - help
Divers
Thread ID:
00406920
Message ID:
00406920
Vues:
54
This is very odd. My query always crashes the first time through, but always succeeds thereafter. It seems that perhaps VFP is not opening the tables in the correct order.

Can anyone explain how I should restructure this query?
lcFirmKey = "00000000"
	SELECT Questions.qkey, Answers.akey, Answers.adate, Answers.answer,;
	  Answers.seealso, Questions.firmkey, Questions.catkey, Questions.qdate,;
	  Questions.question, Kbcats.catname, Kbusers.username AS Q_By_Name, ;
	  Kbusers.userkey AS Q_By_Key, KBAnsU.UserName AS A_By, ;
	  KBAnsU.userkey AS A_By_Key;
	 FROM  .\kbdata\knowledge!answers RIGHT OUTER JOIN .\kbdata\knowledge!questions ;
	    INNER JOIN .\kbdata\knowledge!kbcats;
	    INNER JOIN .\kbdata\knowledge!kbfirms;
	    LEFT OUTER JOIN .\kbdata\knowledge!kbusers;
	    LEFT OUTER JOIN .\kbdata\knowledge!kbusers kbAnsU ;
	    ON Answers.UserKey = KBAnsU.UserKey ;
	   ON  Questions.userkey = kbusers.userkey ;
	   ON  Questions.firmkey = Kbfirms.firmkey ;
	   ON  Questions.catkey = Kbcats.catkey ;
	   ON  Answers.qkey = Questions.qkey ;
	   WHERE Questions.firmkey = lcFirmKey ;
	   ORDER BY CatName, Questions.qkey, QDate ;
		INTO CURSOR TQuery
BROWSE
TIA
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform