What I am trying to do is have an Excel Sheet with a set of values in Column A and
run a sql query using the values in column A to populate the corresponding cell on the same row in column B with an aggregrate value (MAX). Column B should contain the last active date for the part.
I am using Excel 2010, SQLSERVER 2008.(Before SQL run) Column A Column B part1 <null> part2 <null> part3 <null> (After SQL run) Column A Column B part1 2010-08-01 part2 2010-07-01 part3 2009-01-01 and so on
My procedure is as follows: On the ribbon select the DATA tab, then CONNECTIONS button, then select my procedure X from the WORKBOOK CONNECTION list, press the PROPERTIES button on the same screen. press the DEFINITION tab on the CONNECTION properties screen, change the COMMAND TYPE to 'sql' and type the
following in the COMMAND TEXT window .
I've tried many things where the ????? are but nothing works as far as readingselect name from pbaTable where pbaid = ?????
from the cell, absolute values do work, so the connection is good but that's not what I want.
Kevin
Crossposted here http://www.thecodecage.com/forumz/ex...tml#post740385
Not all forums are the same - seek and you shall find
Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!
Read this to understand why we ask you to do this
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks