Hi
I have four tables which are as follows:
Now, what I want is to make a relation on multiple field (pcode+location) in order to obtain the sales transaction based on City, Country by using the SQL Select, something like this
Kindly guide me how can I do so?
Thanks
Saif
I have four tables which are as follows:
Code:
A. SIMAIN.DBF
-------------
1. Sino c(8)
2. pcode c(10)
3. Invdate d
4. Location c(40)
5. Amount
6. ..
7. ..
B. SISUB.DBF
------------
1. Sino c(8)
2. Icode c(10)
3. QntyMin N(10,3)
4. RateMin N(10,4)
5. ...
6. ...
C. PCODE.DBF
------------
1. Pcode c(8)
2. CustName c(53)
3. ..
4. ..
D. LOCATION.DBF
---------------
1. Pcode c(8)
2. Location c(40)
3. Address c(60)
4. Tel c(10)
5. Fax c(10)
6. ..
7. ..
Now, what I want is to make a relation on multiple field (pcode+location) in order to obtain the sales transaction based on City, Country by using the SQL Select, something like this
Code:
SELECT ;
FROM ;
village!simain ;
INNER JOIN village!sisub ;
ON Simain.sino = Sisub.sino ;
INNER JOIN village!customer ;
ON Simain.pcode = Customer.pcode ;
INNER JOIN village!location ;
ON Simain.location = Location.location;
GROUP BY Simain.sino, Simain.invdate, Simain.pcode, Simain.location,;
Sisub.icode, Sisub.qntymin, Sisub.ratemin, Customer.full_name,;
Location.address, Location.city, Location.country;
INTO CURSOR tmpSales READWRITE
Kindly guide me how can I do so?
Thanks
Saif