Openquery in SQL Server 2012, How can I make this work correctly after migrating from SQL Server 2008(r2)?

Current situation:  Migrating From SQL Server 2008(r2) to SQL Server 2012.

After migrating stored procedures to MSSS 2012 some of them have stopped working, they worked fine on SQL Server 2008(r2)

Linked Server LS1
View - v_A
Executed from within v_A - p_B

v_A: Below is the code in v_A where the problem occurs

select * from OPENquery([LS1], 'set fmtonly off SET NOCOUNT ON  
Exec qsc.dbo.p_B  
''NewBerry,Franklin,Quirp,Crasswell'', ''AUTOMATED,CDP_AWK,POND'',''facility_attr26'',''facility_attr27'',''facility_attr19'', ''facility_attr25'',''AVGVGY0,7DAVGVGY0,VGY0,VGT0,PSTAT0,SPDAY,BBLSJY,PCUBE0,PVASE0,INSMDG0''')lom

Below is the error I receive:

Msg 11526, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1
The metadata could not be determined because statement :
'insert into #flak_Table (flakId, flakman, flakRoute, flakAPI, flakCenter, flakPond, flakType, flakCat' in procedure 'p_B' uses a temp table.

There seems to be an issue with the procedure 'sp_describe_first_result_set'  in 2012.
I have tested LSA and able to pull data from it just fine.
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
Guy Hengel [angelIII / a3]Billing EngineerCommented:
rhservanAuthor Commented:
Thanks angelIII you hit the nail on the head: 

Section M is the correct syntax for my problem everything is again working.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.