Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Sep 2005 @ 13:47:00 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Stored Procedure Integer Input Parameter Handling
 
From:   Geoffrey Rommel

  I have defined one of the parameters in a SP as INTEGER. While calling the SP there could be possibility of sending the value as say '101,102' (comma separated integers). Ideally SP should error out but unfortunately TD is concatenating 101 & 102 (101102) and storing it as Integer.  


Unfortunately, you have run into an oddity of the parser. If it thinks it can legitimately turn a character string into a number, it will.

     select '101,102'+0;

      *** Query completed. One row found. One column returned.
      *** Total elapsed time was 1 second.

              ('101,102'+0)
     ----------------------
      1.01102000000000E 005

     select '101-102'+0;

      *** Query completed. One row found. One column returned.
      *** Total elapsed time was 1 second.

              ('101-102'+0)
     ----------------------
      1.01102000000000E 005


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023