Skip to content
Advertisement

Need to add double quotes to SQL SERVER string values

I have integer values that are being passed from a parameter that needed to be input as a string and padded so that they are 7 digits. This will then be passed into another query.

This codes sets @control_num as (‘0005675, 0045464, 0002323’). I need this to be passed as (“0005675”, “0045464”, “0002323”).

I’ve looked at other examples on-line but I can’t seem to get this to work. Does anyone know how to get the double quotes around each value?

Advertisement

Answer

I think there is some issue in setting @control_num.

Please try the following:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement