Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transform fields into like table
Message
From
18/07/2006 12:34:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/07/2006 21:22:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01137123
Message ID:
01137287
Views:
21
>Hi all,
>
>I have mytable.dbf that had 5 fields:
>
>dateyearmonth typename cause numLoss totalloss
>
>200601 flex aaaaa 10 1000
>200602 flex aaaaa 20 2000
>200603 flex aaaaa 30 3000
>200604 flex aaaaa 40 4000
>
>to get a newtable with these results with SQL statment if possible:
>
>
> 200601 200602 200603 200604 Grand Total
>
>flex 10,1000 20,2000 30,3000 40,4000 100, 10000
>
>total 10,1000 20,2000 30,3000 40,4000 100, 10000
>
>
>10,20,30,40 are numloss fields with grand total of 100
>
>1000,2000,3000,4000 are totalloss fields with grand total of 10000
>
>Any help in coding with SQL would be appreciated
>
>TIA

Doing that with SQL is not the preferred way IMHO.
Select data like Pivot table Thread #1134342 Message #1134342
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform