L
Lance
I am attempting to convert a text field into a long integer.
I have two fields in my table.
Field1 (Value COCurr): Text field containing string numbers with
commas, decimals, and trailing negative signs
Field2 (Cost): Long integer field containing nothing.
I am trying to run an update query, that looks at the string in field
1, determines whether it has a trailing negative sign or not, and then
attempts to convert it into a number, using the cLng conversion
function.
However, when I try to execute this update query, I get no value in
Field2. It's as if I've done nothing. What am I doing wrong?
I have included the SQL below...
UPDATE [2007-09 A380 Production Hardware]
SET [2007-09 A380 Production Hardware].Cost =
CLng(if(Right([Value COCurr],1)="-",-Left([Value COCurr],Len([value
COCurr])-1),[Value COCurr]));
I have two fields in my table.
Field1 (Value COCurr): Text field containing string numbers with
commas, decimals, and trailing negative signs
Field2 (Cost): Long integer field containing nothing.
I am trying to run an update query, that looks at the string in field
1, determines whether it has a trailing negative sign or not, and then
attempts to convert it into a number, using the cLng conversion
function.
However, when I try to execute this update query, I get no value in
Field2. It's as if I've done nothing. What am I doing wrong?
I have included the SQL below...
UPDATE [2007-09 A380 Production Hardware]
SET [2007-09 A380 Production Hardware].Cost =
CLng(if(Right([Value COCurr],1)="-",-Left([Value COCurr],Len([value
COCurr])-1),[Value COCurr]));