Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Right Truncation Of String Data
Old 11-28-2007, 11:42 AM Right Truncation Of String Data
Skilled Talker

Posts: 60
Name: Nick Martin
Trades: 0
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;
SpudNik is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-28-2007, 11:44 AM Re: Right Truncation Of String Data
Skilled Talker

Posts: 60
Name: Nick Martin
Trades: 0
I also want to add that I have tried changing the comparison at the else if to be '<>' and I get the same results. So I don't think it's the operator.
SpudNik is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Right Truncation Of String Data
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09904 seconds with 12 queries