varchar not var'ing


Charlie Williams

I have a routine to update my SQL Server database where I
call a stored procedure and pass it the appropriate
parameters. Everything works ok, except that the fields
that I have defined in my DB as varchar are being padded
with whitespace, as if they were char fields. I even
tried calling Trim() on the strings before assigning them
to the value of the parameters in question, but it did not

What am I missing?

Charlie (SQL newbie, in case it wasn't obvious)




This sounds strange, have you spefiied the right datatype
for your parameter?

/Fredrik Normén NSQUARED

Charlie Williams

Please withhold your ridicule and mockery, for I feel
sufficiently stupid.

I changed the data type of the column from char to varchar
after I wrote the stored procedure and I neglected to
update the sp after the change. I realized the problem at
5:30 this morning while I was taking a shower.

I apologize if anyone spent their valuable time on my




Stephany Young

Only 12,345 people spent 3 hours on each.

So, at $100.00 per hour your bill will be a paltry $3,703,500.00.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question