Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: anand kulkarni
  Where is anand kulkarni?
 sholapur
 India
 anand kulkarni
 Tags
Subject: mysql join query
Thread ID: 229213 Message ID: 229213 # Views: 34 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Tuesday, May 26, 2009 10:20:49 AM         
   


hi to all

here is the quary for two tables which is working ok but i want to select another table
or i want to connect more than two tables how can it be possible . i know it is possible
i have gone through the inner join,left join,right join , cross join, multiple join but
i couldn't understand how to wright the quary . following is the quary for two tables it
is working fine .

lcSQL = "select custmast.custname,bil_trn.billno,bil_trn.billdate,bil_trn.iname " + ;
",bil_trn.bamount,bil_trn.iqty,bil_trn.irate from custmast join bil_trn on " + ;
" custmast.custid = bil_trn.cust_id where bil_trn.billdate >= ?wtdatef " + ;
"and bil_trn.billdate <= ?wtdatet order by custmast.custid"

* IN ABOVE QUARY I WANT TO ADD ANOTHER ( THIRD ) TABLE -> BIL_MAST FOR THAT WHAT WILL BE THE
* QUERY

Field Field Name Type Width Dec Index Collate Nulls Next Step
1 CUST_ID Integer 4 Yes
2 BILLNO Integer 4 No
3 BILLDATE Date 8 Yes
4 REFNO Character 40 Yes
5 TRNCODE Integer 4 Yes
6 CHQDT Date 8 Yes
7 CHQNO Character 20 Yes
8 VEHITYPE Character 20 Yes
9 VEHINO Character 20 Yes
10 DIS_CO Numeric 13 2 Yes
11 BILLAMT Numeric 13 2 Yes
12 EMB_SRNO Character 45 Yes
13 TOT_RAMT Numeric 13 2 Yes
14 T_PAMT Numeric 13 2 Yes
15 B_PAID Numeric 13 2 Yes
16 BIL_TYPE Character 2 Yes

REGARDS
anand






There is no Age to learn



COMPLETE THREAD
mysql join query Posted by anand kulkarni @ 5/26/2009 10:20:49 AM
RE: mysql join query Posted by Christian Tabligan @ 5/26/2009 10:29:45 AM
RE: mysql join query Posted by John Terburg @ 5/26/2009 11:49:01 AM
RE: mysql join query Posted by anand kulkarni @ 5/27/2009 12:33:06 PM