Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numbering items
Message
From
11/06/1999 14:44:08
 
 
To
10/06/1999 20:12:06
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00228496
Message ID:
00228924
Views:
22
Seems like that would do the same thing if you put the RECNO() in the first SELECT. At any rate, it wouldn't number within the master key, it would number the entire table from 1 to n.

Thanks,

Michelle


>Here's a trick that works only if the SELECT involves a single table:
>
>SELECT * FROM MyTable INTO CURSOR MyCursor NOFILTER
>SELECT *, RECNO() FROM MyCUrsor INTO CURSOR MyFinalCursor
>
>Vlad
>
>>I'm just full of questions today. :)
>>
>>Say I have a table that looks like this:
>>
>>
>>
>>   master     item
>>     1        apple
>>     1        banana
>>     1        pear
>>     2        tomato
>>     2        apricot
>>     3        squash
>>     4        turnip
>>     4        orange
>>
>>
>>
>>I want to get this:
>>
>>
>>
>>   master  #   item
>>     1     1   apple
>>     1     2   banana
>>     1     3   pear
>>     2     1   tomato
>>     2     2   apricot
>>     3     1   squash
>>     4     1   turnip
>>     4     2   orange
>>
>>
>>
>>Is there a way to do this with SQL? It seems like there should be, but it's eluding me. I'm trying to number the items so I can combine a bunch of records into one in a different SQL so I can print the labels I was asking about earlier.
>>
>>Thanks,
>>
>>Michelle
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform