Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Widen number of records by field
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01432871
Message ID:
01432927
Views:
49
>>>>
>>>>George Mastros (SQL Server expert) has Numbers table in each of his databases.
>>>
>>>
>>>But Agnes doesn't
>>
>>Right :) I'm trying to figure out a way to create it with the UNIONs only - I know Boris did it before and I just asked this question to a group of SQL experts.
>
>
>
>select b1+b2+b3+b4+b5+b6+b7+b8+b9+b10+b11+b12 AS Numbers
>from       (select 0 b1  union select 1    b1)  t1
>cross join (select 0 b2  union select 2    b2)  t2
>cross join (select 0 b3  union select 4    b3)  t3
>cross join (select 0 b4  union select 8    b4)  t4
>cross join (select 0 b5  union select 16   b5)  t5
>cross join (select 0 b6  union select 32   b6)  t6
>cross join (select 0 b7  union select 64   b7)  t7
>cross join (select 0 b8  union select 128  b8)  t8
>cross join (select 0 b9  union select 256  b9)  t9
>cross join (select 0 b10 union select 512  b10) t10
>cross join (select 0 b11 union select 1024 b11) t11
>cross join (select 0 b12 union select 2048 b12) t12
>ORDER BY Numbers
>
Thanks a lot, Boris. Unfortunately, this syntax doesn't work in VFP - we need to invent something similar.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform