Shahad g
Shahad g

Reputation: 79

Input parameter in sql

We have a field 'RegCode' that we need to make as an input parameter from the end user and since most of the RegCode records starts with "JB01." we want it to be applied by default and the input parameter will be entered by the end user as a number for example: end user will enter 7001078315 it will captured as "JB01.7001078315". your help is highly appreciated !

Upvotes: 0

Views: 48

Answers (1)

Dzanan Begovic
Dzanan Begovic

Reputation: 160

If you have an input parameter for a SQL procedure, for example @RegCode NVARCHAR(128), then you can SET it to a new value at the beginning of the SQL procedure code:

SET @RegCode = 'JB01.' + @RegCode

Upvotes: 1

Related Questions