Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Newbie on SQL & Excel

Question posted by: Ty (Guest) on July 16th, 2008 08:25 PM
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's Avatar
Philip Wright
Guest
n/a Posts
July 17th, 2008
02:05 PM
#2

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's Avatar
Ty
Guest
n/a Posts
July 17th, 2008
06:15 PM
#3

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's Avatar
Philip Wright
Guest
n/a Posts
July 17th, 2008
11:55 PM
#4

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's Avatar
Ty
Guest
n/a Posts
July 18th, 2008
12:15 AM
#5

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's Avatar
Philip Wright
Guest
n/a Posts
July 18th, 2008
01:35 PM
#6

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/d.../0302hasin.html

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

-Philip


 
Not the answer you were looking for? Post your question . . .
189,074 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors