+ Reply to Thread
Results 1 to 3 of 3

Edit Stored Procedure Query

  1. #1
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Edit Stored Procedure Query

    I am using the following code to run a Stored Procedure Query. It works perfect bringing back 4 columns of data. But is it possible to make it so that it only brings back 2 columns of data. I need the 2nd and 4th, which are named "DateOf" and "Gen", respectively. Someway to include a select command?

    I posted here, without luck: http://www.mrexcel.com/forum/showthread.php?t=367809

    Please Login or Register  to view this content.
    Last edited by erock24; 01-30-2009 at 06:36 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388

    Re: Edit Stored Procedure Query

    I would just loop the recordset and copy only the data you want to the worksheet.
    The code below would replace the CopyFromRecordset line. Change the worksheet index/name as required.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: Edit Stored Procedure Query

    Wow!! That seems to be working perfect. thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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