Funky happenings with Data Export Wizard

  • I am trying to use the DEW to export the return set from a stored procedure to an Excel file.

    This works:

    exec rr_collect_BatchReport NULL, NULL, NULL, '10/22/2008', '10/22/2008', -1, -1

    However, this does not work:

    exec rr_Collect_AgedTrialBalances

    It says that "This SQL Statement is not a query"

    Why would it allow the first one but not the second one?

  • No one knows anything about this?

  • Forgive me if this comes across as too "Tech Support 101", but have you checked to make sure you don't have a typo in the stored proc name?

    Does the stored proc exist?

    Are you referencing the right database?

    I don't see anything wrong with the syntax for what it is, so I can only guess that it is referncing a stored proc that doesn't exist.

    Hope this helps..

    Dan

  • Yes, I copy/pasted the working code directly from Management Studio.

    I would think that if it was trying to reference a SP that didn't exist, the

    error would not have been that the SQL was not a query, agreed?

  • The differences between the 2 that jump out at me are:

    1) The collect vs the Collect

    2) The parameters in the first vs none in the second

  • budbeth (12/26/2008)


    The differences between the 2 that jump out at me are:

    1) The collect vs the Collect

    case means nothing in this context...

    budbeth (12/26/2008)


    2) The parameters in the first vs none in the second

    The second requires no parameters.

    Anything else Mr. Holmes?

  • I tested it with one of my sp's and got the same error when I used the SQL Native Client as the source type. When I changed it to the Microsoft OLE DB Provider for SQL Server it worked....

  • MrBaseball34 (12/26/2008)


    Anything else Mr. Holmes?

    I really don't see any reason to be rude to someone who is attempting to help you, even if their suggestions in this particular case don't solve your problem. In case you were unclear, it is not our JOB to help you here.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Thank you for the reply Seth.

    I wasn't quite sure how to take the Mr. Holmes comment.

    I didn't think Mr. Baseball knew that at one time in my life, many moons ago now, I was engaged to a Mr. Holmes.

    I couldn't decide if I should take it as negative or positive, since I also read many mystery novels & also part of my job is as an analyst.

    So maybe my testing reply may have helped?

    Beth

  • Yes, it was wrong for me to include that comment and I apologize.

    I didn't think about the provider being the problem, I will take a look at it.

    I am running from SQL Server Management Studio version 9.00.1399.00.

  • Apology accepted.

    I've learned over time not to overlook the obvious -- often times that's where the problem lies. (that was my rationale for my first response.)

    I also have the same version pf management Studio.

    Our DBA has told us that we need to use the OLE DB provider, so I think it has something to do with how he has configured our servers.

  • So, when using the export wizard, I need to select the OLE Db provider and not the Native SQLCLient.

  • I tried this again and found that when I click "back" to make changes, I then get the error.

    Because of the variety of errors I receive with the Mgmt Studio wizard, I use the SQL 2000 Import & Export Data wizard instead. (Luckily they left the old version on my machine when they installed the new one.)

    The Mgmt Studio wizard would never let me import from Excel, so I ended up writing an SSIS to deal with it.

  • This message also occurs if there is a structural problem with the stored procedure

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply