We help IT Professionals succeed at work.
Get Started

Foxpro 7 SELECT with JOINS

anderdw2
anderdw2 asked
on
4,691 Views
Last Modified: 2012-05-11
We have a legacy application that uses an advantage database server, serving .dbf   We access the data with Foxpro 7.   I'm trying to do a query like the following, but cannot get the syntax right for the JOIN   here is my sql without the join

Close Data
SET EXCL OFF

SELECT   s.batch, s.code, s.class, s.nir, s.account, s.arrival, s.return, f.name, s.describe, s.due, b.item as Special_Item, b.amount as Special_Amt, ;
             s.farmname, c.first, c.last, c.business, c.discount, c.pricetier, s.postage, c.billto, c.address1, c.city, c.state, c.zip, ;
             c.fax, c.phone, c.email;  
  FROM samples s, samplexp x, clients c, feedcode f, billitem b;
  WHERE  s.batch = 11748 AND x.location="LANCSAMPLE" AND;
          (s.sampleid = x.sampleid) AND;
              (s.account = c.account) AND;
              (s.feed_type = f.feed_type) AND;
              (s.account = b.account)
                                                   
COPY TO C:\lancasterTest\lancBill TYPE DELIMITED

Return      

I'm trying to do an LEFT/RIGHT OUTER JOIN on the following, as I don't want the data from billitem all to come over.   (s.account = b.account)

Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE