Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EXECUTE WITH RESULT SETS failing in SQL Server 2012

Status
Not open for further replies.

TheBugSlayer

Programmer
Sep 22, 2002
887
US
All,

I have a Data Flow task in an SSIS package wich contains an OLE DB Source component. The component's data access mode is SQL Command. The command is
Code:
exec AccessionCountsByReceivedDate ?, ?
. However, the package complains about being unable to retrieve column information from the data source. So I changed the statement to
Code:
exec AccessionCountsByReceivedDate '2013-09-19', '2013-09-19' 
WITH RESULT SETS 
(
	(groupname as varchar(1000),
	[description] as varchar(1000),
	accessioncount as int,
	avgtat as double)
);
and in SSMS and SSDT the error is
SSMS said:
Incorrect syntax near 'RESULT'
. This being a new statement in 2012, my lack of familiarity with it is obviously a problem. Can someone tell me what is wrong with the statement?

I have similar SSIS packages with connections to SQL Server servers and they work just fine. This issue is caused by the use of a temporary table in the stored procedure. The programmer who wrote the SP is only available twice a week and I needed to complete the SSIS package today.

Thanks for your help.

MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top