Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL code pivotting
Hello I've run my own pivot tables before; Find it easier to work with and for documentation. How do I handle multiple data ranges, as in Excel's wizard ? Is there a way to display the SQL for a table excel created ? Thanks Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL code pivotting
To retrieve SQL from an external SQL query try...
sSQLTxt = Sheets("Sheet1").QueryTables(1).Sql Msgbox sSQLTxt To retrieve SQL from a pivot table using an external SQL query try... sSQL = Sheets("Sheet1").PivotTables("PivotTable1").Source Data sSQLTxt = sSQL(2) Msgbox sSQLTxt Hope that helps. :) -- Thx MSweetG222 "lab-guy" wrote: Hello I've run my own pivot tables before; Find it easier to work with and for documentation. How do I handle multiple data ranges, as in Excel's wizard ? Is there a way to display the SQL for a table excel created ? Thanks Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Pivotting - T. Valko | Excel Worksheet Functions | |||
Pivotting - Formula w/ Varying Column | Excel Worksheet Functions | |||
Pivotting? Transposing? Normal Forming? Crosstabbing? | Excel Discussion (Misc queries) | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming |