Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this SQL?
Message
De
23/03/2004 08:45:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
What's wrong with this SQL?
Divers
Thread ID:
00888825
Message ID:
00888825
Vues:
41
Hi,
What wrong with this sql? It works in command window, but cause error "SQL column 'iiD' is not found" from view designer and dataenvironment.
SELECT Patient_treatments.memcode, Patient_treatments.iid,;
  Patient_treatments.itreatid, Patient_treatments.ddatetime,;
  Patient_treatments.nqty, Patient_treatments.yprice,;
  Patient_treatments.ncount, Treatments.ccode, Treatments.cdesc,;
  SUM( Consultancydetails.iqty) AS nUsed;
 FROM  physician!treatments INNER JOIN physician!patient_treatments;
    INNER JOIN physician!consultancydetails;
    INNER JOIN membership!member;
    RIGHT OUTER JOIN physician!consultancydetails ;
   ON  Consultancydetails.itreatid = Patient_treatments.iid ;
   ON  Patient_treatments.memcode = Member.card_no ;
   ON  Treatments.iid = Consultancydetails.itreatid ;
   ON  Treatments.iid = Patient_treatments.itreatid;
 WHERE Member.card_no = ?vp_memcode;
 GROUP BY Patient_treatments.iid, Patient_treatments.memcode,;
  Patient_treatments.itreatid, Patient_treatments.ddatetime,;
  Patient_treatments.nqty, Patient_treatments.yprice,;
  Patient_treatments.ncount
 HAVING nUsed < Patient_Treatments.nCount
Please advise
Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform