Javier:

Here's the relevant snippets of my code:
       SET VAR fBillrate REAL = NULL
       SELECT payrate INTO fBillrate IND iv1 FROM account WHERE acctno = 
.vmacctno
There will always be a row in the account table, but the PayRate column 
(datatype REAL) might be empty.

So I think my code is what you are suggesting that I do.   

Because I need the value to be null at times, I am going to have to test 
the variable and if it is null do a different Insert statement that simply 
leaves out that column.   Just drives me crazy because I can't believe this 
hasn't blown up on me before...  Have all my insert commands NEVER had null 
variables?

Karen

        
> I have inserted null values before, provided they are allowed, without
> problems. How are you pre-defining your variables? The error seems to
> indicate that the variable is pre-defined but has no value; perhaps the
> SELECT INTO did not find a value or found a blank values? Are you getting 
> an
> error code? Are you using an INDICATOR in your SELECT INTO and what is its
> value when you run into this problem? Maybe you can use the INDICATOR 
> value
> to test and reset your variable as needed prior to the INSERT.
> 
> You can try defining:
> SET VAR vBillRate REAL = NULL
> Or
> SET VAR vBillRate REAL – ‘-0-’
> 
> Before your SELECT INTO.
> 

Reply via email to