Stored Procedure-Dynamic column generation while pivot

Hi Team,

 

I have created stored procedure which transforms rows to columns dynamically using Pivot function and stuff/statement operation in MS-SQL. I have generated the SQL code and I got expected output in DB which dynamically created list of columns. But the problem is when I am using executestoredprocedure function in Appian, the columns which dynamically gets created is missing. 

I tried converting the type in DB but no luck.

I cannot pass selected(hard coded) column values in for() of PIVOT function as my generating column values would be huge.

Help me out..

 

Thanks in advance,

Melwyn J

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    Are you utilizing fn!executestoredprocedure, or the Execute Stored Procedure Smart Service?

    In the documentation for this plug-in it says for the fn!executestoredprocedure: "This function must not be used to update data and actively attempts to prevent such use. Use the Smart Service to update data instead"

    I'm thinking if you're using the function then it will not allow you to pivot the tables.
Reply
  • 0
    Certified Senior Developer
    Are you utilizing fn!executestoredprocedure, or the Execute Stored Procedure Smart Service?

    In the documentation for this plug-in it says for the fn!executestoredprocedure: "This function must not be used to update data and actively attempts to prevent such use. Use the Smart Service to update data instead"

    I'm thinking if you're using the function then it will not allow you to pivot the tables.
Children
No Data