SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 SQL and Excel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jcb267
Posting Yak Master

USA
246 Posts

Posted - 03/05/2014 :  12:12:29  Show Profile  Reply with Quote
Hi -

My company has a standard way of gathering information (from the sales department) and getting it to the actuarial department for use in retrieving data. Most of this is done using excel because just about everyone uses excel! They would send that to the actuarial department (me) and I would use the information to update some sql code to run and retrieve the data needed. Now, I would like to do it in one shot.....I have made an excel book that after the user inputs key information into an input sheet, the code automatically updates. Next, I want to write a macro that copies the code, starts sql, pastes it to sql, runs it then pastes the results back into sql. I can't get it to work though.

Can anyone please help with this?

Thank you in advance!!

John

James K
Flowing Fount of Yak Knowledge

3761 Posts

Posted - 03/05/2014 :  15:41:57  Show Profile  Reply with Quote
quote:
Originally posted by jcb267

Hi -

My company has a standard way of gathering information (from the sales department) and getting it to the actuarial department for use in retrieving data. Most of this is done using excel because just about everyone uses excel! They would send that to the actuarial department (me) and I would use the information to update some sql code to run and retrieve the data needed. Now, I would like to do it in one shot.....I have made an excel book that after the user inputs key information into an input sheet, the code automatically updates. Next, I want to write a macro that copies the code, starts sql, pastes it to sql, runs it then pastes the results back into sql. I can't get it to work though.

Can anyone please help with this?

Thank you in advance!!

John

Depending on the details of what you are trying to accomplish, I would go one of two ways:

1. Write Excel macros to access the SQL Server database, query or save data as required.

or

2. Use an SSIS package to send data to the SQL Server (or populate the data from SQL Server).

If you choose the first route, and from what little I know that seems like what you may need to use, look up some tutorials on how to interact with SQL Server from Excel. Here is an example: http://www.mdobie.co.uk/2012/11/14/query-ms-sql-server-with-excel-vba/
Go to Top of Page

jcb267
Posting Yak Master

USA
246 Posts

Posted - 03/06/2014 :  12:12:59  Show Profile  Reply with Quote
Thank you, James!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000