Skip to main content

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.

NewOpen

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.


Hi @Daan Heemskerk,

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


Yes, you can merge them.


Updated idea statusOpenMerged
Idea merged into:

All the votes from this idea have been transferred.