I am struggling with a stored procedure written in Watcom SQL. I get the "Right Truncation Of String Data" error message at runtime. Upon looking the error up I find the cause is typically becuase a large string value is attempting to be assigned to a field of incompatible size. I don't believe this is my problem because I only have a few variables and commenting out one line seems to allow the procedure to run.
The trouble line is at the ELSEIF statement. This is a very basic condition and I can't figure out what could be going wrong. Again, simply commenting out this ELSEIF removes the error. Any suggestions?
Thanks a ton!
-Nick
Code:
if(@checkme >= 1)and(@checkfor = @checkme)then
set @updates='Found Vin';
elseif (@checkfor) < (@checkme) then //run update
set @updates='Need update';
else
set @updates='Not found';
insert into tblVIN( vin,make,model,year)
values( @CVin,@CMake,@CModel,@CYear)
end if;
|