Skip to main content
Open

Adding table types, and the option to pass them to procedures

Related products:Software Factory
  • November 10, 2021
  • 5 replies
  • 144 views

https://codingsight.com/passing-data-table-as-parameter-to-stored-procedures/

To pass large amounts of data to a performance sensitive stored procedures we would like to pass a table as a parameter to a stored procedure as described in the article above.

For this we need to define a type/domain as a table, and we need to set the parameter of a stored procedure to read only. Those are both options currently not available to us in the SF.

Could this be made possible please? The idea is described in the attached link.

Did this topic help you find an answer to your question?

5 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
Updated idea statusNewOpen

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Updated idea statusOpenOn the backlog

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 637 replies
  • December 28, 2022

We’ve evaluated this idea further. The table-typed domains would have to be exclusive to subroutines as they are database-platform specific and should not interfere with tables and logic procedures called from the UI or service tier.

While we are considering how to implement this, there are alternatives available. You can pass tabular  information to stored procedures via temp tables.

create procedure process_data
as
begin
    select *
    from #tabular_data
end
go

You will need to be strict on the structure and managing of the temp tables, but you can pass information as following from outside of the procedure.

select 
   1      as customer_id, 
   'Test' as customer_name
into #tabular_data

exec process_data

drop table #tabular_data

 


Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • 973 replies
  • January 2, 2025
On the backlogOpen

Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • 973 replies
  • January 2, 2025

Status updated to better reflect the Status of the Idea with the clarified Statuses as explained in the Reply here: What happens to your ideas? (updated as per november 2024) | Thinkwise Community


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings