Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enterprise Manager Importing Data with Custom Query

Status
Not open for further replies.
Jul 14, 2003
116
CA
I'm trying to import data into a table from an excel spreadsheet. However I am not trying to import the data exactly as it is in the excel file I would like to Aggregate the data as I am importing it. Here is the query that I am using:

SELECT ISPTutorial.BusUnit, ISPTutorial.Division, ISPTutorial.Director, ISPTutorial.EmpGroup,
-Sum(ISPTutorial.Status='Completed') as Completed,
-Sum(ISPTutorial.Status='In Progress') as InProgress,
-Sum(ISPTutorial.Status='Not Started') as NotStarted
FROM ISPTutorial
GROUP BY ISPTutorial.BusUnit, ISPTutorial.Division, ISPTutorial.Director, ISPTutorial.EmpGroup;

I created this query with the help of some of the generous folks from Tek-Tips in an Access DB. Now I am trying to figure out what to name the attributes in Enterprise Manager to link them to the Excel file I am importing from. Any ides? Thanks.
 
I would suggest bringing in the full data from Excel into a staging table in SQL Server then do the aggregation from that table.

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top