Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a clever Idea
Message
De
03/10/2002 13:41:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00707362
Message ID:
00707431
Vues:
23
Doug,
Thanks that worked great.

Sandi


>Sandi,
>
>I don't know about clever, but here's a fairly simple solution:
>
>Perform your query, resulting in product code, descriptions and quantity into a cursor (for this example, named curQuery).
>
>CREATE CURSOR curLabel (product_code C(10), product_desc C(50))
>
>* Create a cursor for holding the final results
>SELECT curQuery
>SCAN
> i = 0
> FOR i = 1 TO curQuery.quantity
> INSERT INTO curLabel (product_code, product_desc) ;
> VALUES (curQuery.product_code, curQuery.product_desc)
> ENDFOR
>ENDSCAN
>
>Now, you can use the curLabel cursor to create labels.
>
>Doug
>
>>Hi. I have a table that contains a product code, description and a quantity. I want to create an sql statement in order to product bar code labels. I cant figure out how to breakdown the quantity so I get a cursor with for each product the number of records relating to the quantity.ie.
>>Part A is 3, Part B is 2 so I want:
>> Part A
>> Part A
>> Part A
>> Part B
>> Part B
>>
>>Does anyone know a clever way to get this?
>>
>>TIA,
>>
>>Sandi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform