Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: chandu sekhar
  Where is chandu sekhar?
 miami
 Florida - United States
 chandu sekhar
 Tags
Subject: RE: foxpro query
Thread ID: 233064 Message ID: 233081 # Views: 20 # Ratings: 0
Version: Visual FoxPro 9 Category: ODBC, ADO and OLEDB
Date: Monday, June 29, 2009 8:52:10 PM         
   


> >
> >
> > You should also have a table "Products" where productcode is the unique primary key, + columns that describe each product. And a "Needles" table where the 'needlecode' is the unique primary key. So a complete data retrieval in a query would be:
> >
> >
SELECT * FROM Products P JOIN ProductsNeedles AS PN ON P.productcode=PN.productscode ;
> >  JOIN Needles AS N ON N.needlecode=PN.needlecode ;
> >  ORDER BY P.productcode, N.needlecode INTO CURSOR ReportData1

> > You can ORDER BY any columns you like.
> >
> > -Anders
> Hai Anders,
>
> Thank u so much for the reply.
> Yes I have a "needles" table that has the description about the needles.
> But i dont have products table.
>
> Any way thank you once again...
>
> Let me go through ur solution.
> Let y know the result..
>
> Regards,
> Chandra.


It seems that the two uploads you posted are the same file.
I copied the 313 rows into a VFP table and there are 313 unique productcodes and 131 distinct needlecodes. So there is no example of a productcode with more than one needlecode in that file.

Have you imported your Excel files into VFP or exported your VFP tables to Excel?
-Anders



COMPLETE THREAD
foxpro query Posted by chandu sekhar @ 6/29/2009 6:45:59 PM
RE: foxpro query Posted by Borislav Borissov @ 6/29/2009 7:08:31 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 7:20:17 PM
RE: foxpro query Posted by Borislav Borissov @ 6/29/2009 7:25:19 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 7:55:11 PM
RE: foxpro query Posted by Anders Altberg @ 6/29/2009 8:48:51 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 8:07:04 PM
RE: foxpro query Posted by Cetin Basoz @ 6/29/2009 7:29:47 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 7:58:13 PM
RE: foxpro query Posted by Anders Altberg @ 6/29/2009 8:10:12 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 8:40:33 PM
RE: foxpro query Posted by Anders Altberg @ 6/29/2009 8:52:10 PM
RE: foxpro query Posted by chandu sekhar @ 6/29/2009 9:08:24 PM
RE: foxpro query Posted by Anders Altberg @ 6/29/2009 11:00:07 PM
RE: foxpro query Posted by chandu sekhar @ 6/30/2009 4:12:31 PM
RE: foxpro query Posted by Anders Altberg @ 6/30/2009 4:41:10 PM