Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Running out of memory
Message
De
08/06/2007 16:50:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Running out of memory
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01231705
Message ID:
01231705
Vues:
53
UPDATE: Got it. I needed to add in Pat_No to the JOINs. Doh! It was just doing what I was telling it to do... I hate that!

The problem is with the Covr table, I'm sure, but I don't know why. I've done JOINs using the same table with different aliases before, so it must be something else. Anyone see anything?
Covr table looks something like this:

Pat_No     CvPs     Seq_Num
 0001       P         1
 0001       S         2
 0002       P         5
 0002       S         9
 0002       T         4


	SELECT ChgTemp.*, ;
		IIF( Account.Prnt_HCFA, ' ', '*' ) AS DoNotPrint, ;
		InsCarr.CarName, ;
		InsCarr.InsCarr, ;
		Patient.PtF_Name, ;
		Ins_Case.Pat_No, ;
		Ins_Case.Seq_Num, ;
		RefProv.RefProv, ;
		RefProv.Name, ;
		CovrPri.CvID AS Pri_CvID, ;
		CovrPri.Comp_Pol AS Pri_Comp_Pol, ;
		CovrSec.CvID AS Sec_CvID, ;
		CovrSec.Comp_Pol AS Sec_Comp_Pol, ;
		CovrTer.CvID AS Ter_CvID, ;
		CovrTer.Comp_Pol AS Ter_Comp_Pol ;
		FROM ChgTemp ;
			JOIN ( m.gcPromptPath + 'InsCarr' ) ON InsCarr.InsCarr == ChgTemp.Carrier ;
			JOIN ( m.gcDataPath + 'Account' ) ON Account.Acct_No == ChgTemp.Acct_No ;
			JOIN ( m.gcDataPath + 'Patient' ) ON Patient.PtPn == ChgTemp.Patient ;
			LEFT OUTER JOIN ( m.gcDataPath + 'Ins_Case' ) ON Ins_Case.Pat_No == ChgTemp.Patient AND Ins_Case.Seq_Num == ChgTemp.Seq_Num ;
			LEFT OUTER JOIN ( m.gcPromptPath + 'RefProv' ) ON RefProv.RefProv == Ins_Case.RefProv ;
			LEFT OUTER JOIN ( m.gcDataPath + 'Covr' ) AS CovrPri ON CovrPri.CvPs = 'P' and ChgTemp.Pri_Seq = CovrPri.Seq_Num ;
			LEFT OUTER JOIN ( m.gcDataPath + 'Covr' ) AS CovrSec ON CovrSec.CvPs = 'S' and ChgTemp.Sec_Seq = CovrSec.Seq_Num ;
			LEFT OUTER JOIN ( m.gcDataPath + 'Covr' ) AS CovrTer ON CovrTer.CvPs = 'T' and ChgTemp.Ter_Seq = CovrTer.Seq_Num ;
		WHERE InsCarr.InsCarr # '    ' ;
		ORDER BY ;
			InsCarr.CarName, ;
			Patient.PtF_Name, ;
			ChgTemp.From_Date, ;
			ChgTemp.RecNumber ;
		INTO CURSOR RptData
Répondre
Fil
Voir

Click here to load this message in the networking platform