+ Reply to Thread
Results 1 to 3 of 3

Want to use Excel column cells as parameters to SQLSERVER query

  1. #1
    Registered User
    Join Date
    06-03-2010
    Location
    Tamarac, USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Want to use Excel column cells as parameters to SQLSERVER query

    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.

    Please Login or Register  to view this content.
    I am using Excel 2010, SQLSERVER 2008.

    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 .

    Please Login or Register  to view this content.
    I've tried many things where the ????? are but nothing works as far as reading
    from the cell, absolute values do work, so the connection is good but that's not what I want.
    Kevin

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Want to use Excel column cells as parameters to SQLSERVER query

    Crossposted here http://www.thecodecage.com/forumz/ex...tml#post740385
    Not all forums are the same - seek and you shall find

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Want to use Excel column cells as parameters to SQLSERVER query

    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
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1