Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prob w/ left outer join syntax
Message
 
 
To
31/07/2002 22:19:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00684826
Message ID:
00684830
Views:
14
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform