Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Excel and SQL Query HELP !!

Author  Topic 

saurabhwise
Starting Member

3 Posts

Posted - 2011-07-14 : 14:48:01
Hi,

I'm an accountant by profession but can write some simple SQL queries.

I need to use an Excel file and retrieve data according to the client number in the excel file.

Excel file has the client number and I need to retrieve DOB, Amount Owing etc from Database for the clients in the excel file.

Any help will be greatly appreciated.

Thanks :)

dlorenc
Posting Yak Master

172 Posts

Posted - 2011-07-15 : 11:22:04
Maybe I can get you part way there...

I have used a pivot table to pull sql data..using the filters, you can drill down to find a particcular record...

In the data tab, connections, add a connection to the sql table. you will need to have access, either thru your AD ID or a sql user name pw..mm?..

then insert a pivot table, use the second option (use an external data source. This will point the pivot table to the sql table...
the fields in the sql table will appear in the pivot table field list...
Go to Top of Page

saurabhwise
Starting Member

3 Posts

Posted - 2011-07-15 : 12:10:22
Thanks for the reply, but I took another route.
WHERE Q.CLIENT_ID IN ( Pasted all the Client #s here) and it worked.

Go to Top of Page
   

- Advertisement -