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: 233213 # Views: 19 # Ratings: 0
Version: Visual FoxPro 9 Category: ODBC, ADO and OLEDB
Date: Tuesday, June 30, 2009 4:41:10 PM         
   


> >
> >
> > Got them. 313 rows (with 313 unique productcodes) in one table.
> > 1447 different needlecodes in the other Excel worksheet. Of the 131 distinct needlecodes in the combination table 104 codes are not present in the Needles table, while 26 are found.
> > What gives?
> >
> > -Anders
>
> I have imported this excel sheet to VFP database.


Then you can base a VFP report for printing or display on the combination table with productcode, needlecode.

If you want to see the needlecode that belong to each productcode, that is imply the tble that you have; it only contains a single needlecode for each of the 313 unique productcodes.
If you want to reverse that and see the different products that a needlecode share needlecode you can reorder the contents:
SELECT needlecode, productcode FROM mytable ORDER BY neddlecode, productcode INTO CURSOR Q1
BROWSE NOWAIT 

In a report (CREATE REPORT) make a group band with 'Needlecode' and put 'Productcode' in a textbox in the Detail band.
There are 131 different needlecodes in that table so on the average there will be between 2 and 3 productcodes for each needlecode.
As I said ony a few, 26, needlecodes in that table are found in you Needles table.

The productcodes are complex and I guess the letters and numbers are meaningful and are codes in themselves, known in he trade or in your company. They should probably best be split into separate columns in a Products table, or several tables, in the process called 'normalization'.

-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