Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement