Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prob w/ left outer join syntax
Message
 
 
À
31/07/2002 22:19:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00684826
Message ID:
00684830
Vues:
13
Hi David,

I'm not sure why do you've ",sostrs" in following fragment
"inner join arcust on sosord.ccustno = arcust.ccustno, " + ;
"sostrs " + ;

" left outer join icunit on sostrs.cmeasure = icunit.cmeasure "

Also
"left outer join sostrs on iciwhs.citemno+iciwhs.cwarehouse= sostrs.citemno+sostrs.cwarehouse " + ;
looks like a VFP code. In Sql Server it should be
"left outer join sostrs on iciwhs.citemno = sostrs.citemno 
AND iciwhs.cwarehouse= sostrs.cwarehouse " + ;
>In the code posted previously, icunit should not be in the from list. It should be:
>>
>>lcFromClause= ;
>>" from " + ;
>>"iciwhs " + ;
>>"left outer join sostrs on iciwhs.citemno+iciwhs.cwarehouse= sostrs.citemno+sostrs.cwarehouse " + ;
>>"inner join icwhse on iciwhs.cwarehouse=icwhse.cwarehouse, " + ;
>>"sosord " + ;
>>"left outer join Arslpn on sosord.cSlpnNo = Arslpn.cSlpnNo " + ;
>>" inner join arcust on sosord.ccustno = arcust.ccustno, " + ;
>>"sostrs " + ;
>>" left outer join icunit on sostrs.cmeasure = icunit.cmeasure "
>>
>>
>>lcWhereClause= ;
>>" where " + ;
>>"Sostrs.nOrdQty > Sostrs.nShipQty and " + ;
>>"Sosord.lQuote <> 1 " + ;
>>" and sosord.csono = sostrs.csono "
>>
>>
>>
>>lcSqlCmd='select ' + lcFields1+lcMoreFields+ lcFromClause + lcWhereClause
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform