Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jagdish Sharma
  Where is Jagdish Sharma?
 Mumbai
 India
 Jagdish Sharma
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: sql statement
Thread ID: 78470 Message ID: 78508 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Tuesday, October 04, 2005 5:44:38 PM         
   


> > hi experts
> > i have two table 'glmaster' and 'purchdetail'
> > fields in glmaster
> > ac_id,ac_name,address
> >
> > fields in purchdetail
> > doc_no,doc_date,ac_id,mill_id,qty,rate,amount
> >
> > now i want to create a new table with sql like this
> > doc_no,doc_date,Account_name,Mill_name,qty,rate,amount
> >
> > how can i get this result thru sql
> >
> > please help me.thanks in advance
> > jagdish

>
> I assume that you would have a "Mill" table somewhere (Mill_Name does not exist int PurchDetail or GLMaster. Let's say that your Mill table contains at least Mill_ID and Mill_Name.
>
> SELECT DocNo, DocDate, Ac_Name as Account_Name, Mill_Name, Qty, ;
> Rate, Amount ;
> FROM PurchDetail ;
> INNER JOIN GLMaster ON PurchDetail.Ac_ID = GlMaster.Ac_ID,;
> INNER JOIN MillTable ON PurchDetail.Mill_ID = MillTable.Mill_ID ;
> INTO CURSOR Results


thanks for your reply.
I haven't a separate "Mill" table.I use glmaster for the same.

regards
jagdish

ENTIRE THREAD

sql statement Posted by Jagdish Sharma @ 10/4/2005 8:29:20 AM
RE: sql statement Posted by Borislav Borissov @ 10/4/2005 9:00:35 AM
RE: sql statement Posted by Ken Murphy @ 10/4/2005 1:46:14 PM
RE: sql statement Posted by Jagdish Sharma @ 10/4/2005 5:44:38 PM