Skip to main content
Merged

Default value for procedure parameters

Related products:Software Factory

Default for procedure parameters.

If you can provide a default value for a procedure parameter, you can call the procedure without that parameter using the “named parameter feature” of SQL server.

This allows you to create a procedure for which you only have to give some required and some other parameters. That makes coding more dynamic, and the model less restrictive.

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
NewOpen

Forum|alt.badge.img+5

I have a work around but it is against thinkwise logic.

The work around is to close the procedure and create a procedure_va variant in the next code block. It is hacky but allows to create a procedure call in which you can use named parameters, and don’t have to specify all.

This is important as it allows to fall back on the same procedure from multiple points in the application not needing to refactor everything when one parameter changes.


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi @Daan Heemskerk,

I feel your idea overlaps with this one, is that correct?:
Optional parameters in procedures | Thinkwise Community (thinkwisesoftware.com)


Forum|alt.badge.img+5

Yes, you can merge them.


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Updated idea statusOpenMerged
Idea merged into:
https://community.thinkwisesoftware.com/ideas/optional-parameters-in-procedures-1717
All the votes from this idea have been transferred.


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