You are on page 1of 20

INSTRUCTIONS

Step 1: Select the query to be run from the option buttons below.
Step 2: Click the [Run Selected Query] button.

Select the Query to Run

NWind Category Sales>$60k for 1995


NWind XTab: Sales By Year
Generic Oracle Query
Generic Excel List Query
No Query defined for this option
No Query defined for this option
No Query defined for this option
No Query defined for this option
No Query defined for this option
No Query defined for this option

Query Name: Err:502


Err:502

Data Provider: Err:502


Data Source: Err:502
SQL Code: Err:502

Dest Sheet: Err:502


Data Range: Err:502
DataStartCell: Err:502
Search Value: Err:502
Replace Value: Err:502
version 1b

Run Selected Query . . .

Last run: Wed, 06/07/2006 02:19:29 PM


Last run: Wed, 06/07/2006 02:06:40 PM

Last run: Fri, 07/28/2006 09:08:23 AM


LU_QueryInfo Details_Qry01
Qry_Nickname NWind Category Sales>$60k for 1995
Qry_Desc This query runs the "Category Sales for 1995" query
in the NWind.mdb file and returns Category Sales
greater than $60,000
Data_Source C:\Analysis\MSA_Nortwind\Nwind.mdb
Data_Provider Microsoft.Jet.OLEDB.4.0
Dest_Worksheet Qry01_Results
Wksht_Data_Range Qry01_ResultsData_1
DataStartCell Qry01_DataStart
FindVal
ReplaceVal
SQL_Transform

SQL_Select SELECT tblSrc.CategoryName, tblSrc.CategorySales

SQL_From FROM [Category Sales for 1995] tblSrc

SQL_Where WHERE tblSrc.CategorySales > 60000

SQL_GroupBy

SQL_OrderBy ORDER BY tblSrc.CategorySales DESC

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

FROM Orders INNER JOIN [Order Subtotals] ON FROM OracleSchema.sometable tblSrc


Orders.OrderID = [Order Subtotals].OrderID

WHERE (((Year([ShippedDate])) Is Not Null))

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.

Excel File C:\Analysis\MSA_Nortwind\Nwind.mdb


Microsoft.Jet.OLEDB.4.0 Microsoft.Jet.OLEDB.4.0
Qry04_Results Qry05_Results
Qry04_ResultsData_1 Qry05_ResultsData_1
Qry04_DataStart Qry05_DataStart

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")

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")
Details_Qry06 Details_Qry07
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
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

You might also like