Professional Documents
Culture Documents
Step 1: Select the query to be run from the option buttons below.
Step 2: Click the [Run Selected Query] button.
SQL_GroupBy
SQL_Pivot
SQL_Code SELECT tblSrc.CategoryName, tblSrc.CategorySales
FROM [Category Sales for 1995] tblSrc WHERE
tblSrc.CategorySales > 60000 ORDER BY
tblSrc.CategorySales DESC
Details_Qry02 Details_Qry03
NWind XTab: Sales By Year Generic Oracle Query
This query accesses the NWind.mdb and constructs a This query is NOT functional. It is only here to
X-Tab report of Sales by Year, replacing blanks with demonstrate the structure used for an Oracle query
the word "None"
C:\Analysis\MSA_Nortwind\Nwind.mdb (enter a TNSNAMES.ORA entry here)
Microsoft.Jet.OLEDB.4.0 MSDAORA
Qry02_Results Qry03_Results
Qry02_ResultsData_1 Qry03_ResultsData_1
Qry02_DataStart Qry03_DataStart
None
TRANSFORM Sum([Order Subtotals].Subtotal) AS
SumOfSubtotal
SELECT Orders.OrderID SELECT tblSrc.Customer, tblSrc.Sales
GROUP BY Orders.OrderID
ORDER BY Year([ShippedDate])
PIVOT Year([ShippedDate]);
TRANSFORM Sum([Order Subtotals].Subtotal) AS SELECT tblSrc.Customer, tblSrc.Sales FROM
SumOfSubtotal SELECT Orders.OrderID FROM OracleSchema.sometable tblSrc
Orders INNER JOIN [Order Subtotals] ON
Orders.OrderID = [Order Subtotals].OrderID WHERE
(((Year([ShippedDate])) Is Not Null)) GROUP BY
Orders.OrderID ORDER BY Year([ShippedDate])
PIVOT Year([ShippedDate]);
Details_Qry04 Details_Qry05
Generic Excel List Query No Query defined for this option
This is an example of how to use an Excel list as a (n/a)
data table and perform a query against it.
SELECT
Src_1.CUST_ID AS CUST_NUM,
Src_1.CUST_TYPE AS TYPE,
Src_1.CUST_CITY AS LOCATION
FROM
C:\Data\MyExcelFile.rngMyDataList Src_1
Where
CUST_TYPE IN ("CONTRACT","PROJECT","TEMP")
C:\Analysis\MSA_Nortwind\Nwind.mdb C:\Analysis\MSA_Nortwind\Nwind.mdb
Microsoft.Jet.OLEDB.4.0 Microsoft.Jet.OLEDB.4.0
Qry06_Results Qry07_Results
Qry06_ResultsData_1 Qry07_ResultsData_1
Qry06_DataStart Qry07_DataStart
Details_Qry08 Details_Qry09
No Query defined for this option No Query defined for this option
(n/a) (n/a)
C:\Analysis\MSA_Nortwind\Nwind.mdb C:\Analysis\MSA_Nortwind\Nwind.mdb
Microsoft.Jet.OLEDB.4.0 Microsoft.Jet.OLEDB.4.0
Qry08_Results Qry09_Results
Qry08_ResultsData_1 Qry09_ResultsData_1
Qry08_DataStart Qry09_DataStart
9999999999
#MI
Details_Qry10
No Query defined for this option
(n/a)
C:\Analysis\MSA_Nortwind\Nwind.mdb
Microsoft.Jet.OLEDB.4.0
Qry10_Results
Qry10_ResultsData_1
Qry10_DataStart
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet
View the QryMaster sheet