Connecting Tech Pros Worldwide Forums | Help | Site Map

Newbie on SQL & Excel

Ty
Guest
 
Posts: n/a
#1: Jul 16 '08
I'm new to SQL but not Excel

I was given a Excel spreadsheet with Employee names. I have a large
database with a Personal Table with Employee names and a whole list of
other tables that I'm used to running queries. I'm still new to
queries.

I can run queries using the Pers_Table with employees and other
tables. How can I import the Excel sheet and use it as the Pers table
with only the names of the 10 employees listed in the Mainframe export
of Employees.

My files:
Mainframe.xls for 10 mainframe users.

My tables:
Auth_id for user id's
CostCtr for Cost center codes

I'm attempting to do the above in MS Access.

Is there a way to do the above via SQuirreL SQL(an open-source Java
SQL Client program) on a DB2 database?

Thanks..


Philip Wright
Guest
 
Posts: n/a
#2: Jul 17 '08

re: Newbie on SQL & Excel


Ty wrote:
Quote:
I'm new to SQL but not Excel
>
I was given a Excel spreadsheet with Employee names. I have a large
database with a Personal Table with Employee names and a whole list of
other tables that I'm used to running queries. I'm still new to
queries.
>
I can run queries using the Pers_Table with employees and other
tables. How can I import the Excel sheet and use it as the Pers table
with only the names of the 10 employees listed in the Mainframe export
of Employees.
>
My files:
Mainframe.xls for 10 mainframe users.
>
My tables:
Auth_id for user id's
CostCtr for Cost center codes
>
I'm attempting to do the above in MS Access.
>
Is there a way to do the above via SQuirreL SQL(an open-source Java
SQL Client program) on a DB2 database?
>
Thanks..
>
I'm not clear on what you are trying to accomplish, but you can query
most major SQL databases (including DB2) directly from Excel using a
little VBA and ADO. I can posts links to examples if you desire.

-Philip
Ty
Guest
 
Posts: n/a
#3: Jul 17 '08

re: Newbie on SQL & Excel


On Jul 17, 9:04*am, Philip Wright <pvws...@bellsouth.netwrote:
Quote:
Ty wrote:
Quote:
I'm new to SQL but not Excel
>
Quote:
I was given a Excel spreadsheet with Employee names. *I have a large
database with a Personal Table with Employee names and a whole list of
other tables that I'm used to running queries. *I'm still new to
queries.
>
Quote:
I can run queries using the Pers_Table with employees and other
tables. *How can I import the Excel sheet and use it as the Pers table
with only the names of the 10 employees listed in the Mainframe export
of Employees.
>
Quote:
My files:
Mainframe.xls for 10 mainframe users.
>
Quote:
My tables:
Auth_id for user id's
CostCtr for Cost center codes
>
Quote:
I'm attempting to do the above in MS Access.
>
Quote:
Is there a way to do the above via SQuirreL SQL(an open-source Java
SQL Client program) on a DB2 database?
>
Quote:
Thanks..
>
I'm not clear on what you are trying to accomplish, but you can query
most major SQL databases (including DB2) directly from Excel using a
little VBA and ADO. I can posts links to examples if you desire.
>
-Philip- Hide quoted text -
>
- Show quoted text -
I'm trying to restrict my query to the list of names in the Excel s/
s(spreadsheet).
Here are some steps given to me. I will attempt to do this:

Drag a common field (perhaps EmployeeID) from the Excel table to the
Pers_Table.
This operation is called "creating an inner join". Run the query. It
will now restrict the query to the list in the Excel file.
Philip Wright
Guest
 
Posts: n/a
#4: Jul 18 '08

re: Newbie on SQL & Excel


Ty wrote:
Quote:
>
I'm trying to restrict my query to the list of names in the Excel s/
s(spreadsheet).
Here are some steps given to me. I will attempt to do this:
>
Drag a common field (perhaps EmployeeID) from the Excel table to the
Pers_Table.
This operation is called "creating an inner join". Run the query. It
will now restrict the query to the list in the Excel file.
Now I understand. Unfortunately I have never used SQuirreL, but I
just looked at their website and looks like the kind of thing that
SQuirreL should be able to accomplish. I still think that it would
be less coding to use ADO and have the join returned as an ADO resultset.

-Philip
Ty
Guest
 
Posts: n/a
#5: Jul 18 '08

re: Newbie on SQL & Excel


On Jul 17, 6:46*pm, Philip Wright <pvws...@bellsouth.netwrote:
Quote:
Ty wrote:
>
Quote:
I'm trying to restrict my query to the list of names in the Excel s/
s(spreadsheet).
Here are some steps given to me. *I will attempt to do this:
>
Quote:
Drag a common field (perhaps EmployeeID) from the Excel table to the
Pers_Table.
This operation is called "creating an inner join". Run the query. It
will now restrict the query to the list in the Excel file.
>
Now I understand. Unfortunately I have never used SQuirreL, but I
just looked at their website and looks like the kind of thing that
SQuirreL should be able to accomplish. I still think that it would
be less coding to use ADO and have the join returned as an ADO resultset.
>
-Philip
OK.. I might try that. What examples do you have?
Philip Wright
Guest
 
Posts: n/a
#6: Jul 18 '08

re: Newbie on SQL & Excel


Ty wrote:
Quote:
>
OK.. I might try that. What examples do you have?

I have a good O'Reilly book called "ADO: ActiveX Data Objects"
by Jason T. Roff ISBN: 1-56592-415-0

There are also good examples at Microsoft and IBM:

http://support.microsoft.com/kb/247412/EN-US/
http://support.microsoft.com/kb/278973/EN-US/
http://www.ibm.com/developerworks/db...0302hasin.html

There a couple of good ADO newsgroups too:
microsoft.public.data.ado
microsoft.public.vb.database.ado

-Philip

Closed Thread