Gives

Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
Integrity constraint violation;-8006 POS(73) Data types must be compatible.
select *
  from TB_PARCELA
 where VL_NOMINAL < VL_PAGO
   and DT_VCTO > adddate(DATE,180)





> [EMAIL PROTECTED] wrote:
>
>> I need to execute a query that returns all debts of a client
>> over 180 days.
>>
>> I'm trying something like
>>
>> select * from MYTABLE
>>  where clientid = 1
>>    and dueDate > addDate(select DATE from DUAL, 180)
>>
>> but I always get an error:
>>
>> General error;-7056 POS(81) Subquery not allowed.
>>
>> and if I execute
>>
>> select * from MYTABLE
>>  where clientid = 1
>>    and dueDate > addDate((select DATE from DUAL), 180)
>>
>>
>> or execute
>>
>> select * from MYTABLE
>>  where clientid = 1
>>    and dueDate > addDate((select max(DATE) from DUAL), 180)
>>
>> I get
>>
>> Integrity constraint violation;-8006 POS(73) Data types must
>> be compatible.
>>
>> If I try
>>
>> select * from MYTABLE, DUAL
>>  where clientid = 1
>>    and dueDate > addDate(DUAL.DATE, 180)
>>
>> I get
>>
>> Column not found;-4005 POS(87) Unknown column name:DATE.
>>
>>
>> What should I do?
>
> Try it with
>
> select * from MYTABLE
>   where clientid = 1
>    and dueDate > addDate(DATE, 180)
>
> Best regards,
> Holger
> SAP Labs Berlin
>


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to