|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 9:47 AM
Points: 259,
Visits: 331
|
|
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?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 9:47 AM
Points: 259,
Visits: 331
|
|
| No one knows anything about this?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:51 PM
Points: 269,
Visits: 338
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 9:47 AM
Points: 259,
Visits: 331
|
|
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?
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 39,
Visits: 375
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 9:47 AM
Points: 259,
Visits: 331
|
|
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?
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 39,
Visits: 375
|
|
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....
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Wednesday, November 07, 2012 4:08 PM
Points: 1,525,
Visits: 4,047
|
|
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 :: Running Totals :: Tally Table :: Cross Tabs/Pivots :: String Concatenation
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 39,
Visits: 375
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 9:47 AM
Points: 259,
Visits: 331
|
|
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.
|
|
|
|