November 23, 2004 at 12:48 pm
How can I insert a "-" into "char10" field that has trailing spaces ?
I tried the following but it failed ?
--------------------------------------
UPDATE US_ZIP_temp
SET Longitude = '-' + Longitude, ZIP = '94949'
WHERE (ZIP = '94949')
--------------------------------------
Current Longitude = 152.56
Desired Longitude = -152.56
November 23, 2004 at 12:57 pm
It looks like you are trying to insert into a char or varchar field from the code, but I am guessing this is actually a numeric field.
try multiplying Longitude by negative one.
I wasn't born stupid - I had to study.
November 23, 2004 at 1:02 pm
I am sorry. You did say it was a char(10) field.
I tried this with a char(10) and it worked fine.
I wasn't born stupid - I had to study.
November 23, 2004 at 4:56 pm
Thanks
It works . . .
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply