nachtmsk
asked on
Remove leading spaces from SQL proc variable
Hi,
I need to modify a proc that someone else has created.
I need to remove any leading spaces from the contents of a variable in the proc.
The variable is defined as this:
@szQuickValue varchar(50) = null,
I see, in looking this up, that there is a BTrim function, but I'm not sure if that will work for me because the example doesn't look like it's taking a variable that starts with a "@".
I'm not an expert at Stored Procs.
I need to do this on a production system, no test system available, so I'm trying very hard to get this right the first time!
Thanks,
Nacht
I need to modify a proc that someone else has created.
I need to remove any leading spaces from the contents of a variable in the proc.
The variable is defined as this:
@szQuickValue varchar(50) = null,
I see, in looking this up, that there is a BTrim function, but I'm not sure if that will work for me because the example doesn't look like it's taking a variable that starts with a "@".
I'm not an expert at Stored Procs.
I need to do this on a production system, no test system available, so I'm trying very hard to get this right the first time!
Thanks,
Nacht
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
And then Change "Create" to "Alter" after changes you are making to your code inside. And then run it. Keep a copy of the original code in case you need it.