Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie at select statements
Message
From
01/11/2000 20:44:43
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00436920
Message ID:
00436978
Views:
22
Pat,

Your SQL looks ok to me. Please construct yourself a special set of test data with account numbers 0, 1, 2, 3, 199, 200, 201, 202 and test on that. Post back with the results.


>For everyone that must be confused by now, I'm going to restate my original question correctly:
>
>I can't figure out why these two select statements give me different results. The only difference is the where clause.
>
>select sum(scordln.orl_qty-scordln.orl_qtyinvoiced) as nqty ;
>from scordln left outer join scorder ;
>on scordln.orl_order = scorder.ord_order ;
>where between(scorder.ord_acct,1,200) ;
>into cursor cqty
>
>select sum(scordln.orl_qty-scordln.orl_qtyinvoiced) as nqty ;
>from scordln left outer join scorder ;
>on scordln.orl_order = scorder.ord_order ;
>where scorder.ord_acct < 201 ;
>into cursor cqty
>
>I have an accct# 2 and acct# 202.
>The 1st select give results for acct# 2 only.
>The 2nd give results for acct# 1 and acct# 202
>
>Sorry for the confusion. I wish you could edit a message after you set it.
>
>Thanks
>
>Pat Murphy
Previous
Reply
Map
View

Click here to load this message in the networking platform