RE: DUAL on subqueries or on join

2003-11-17 Thread Zabach, Elke
[EMAIL PROTECTED] wrote: > Hi! > > 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 erro

RE: DUAL on subqueries or on join

2003-11-13 Thread edson . richter
This works (dueDate is timestamp, my fault): select * from MYTABLE where clientid = 1 and date(dueDate) > 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 MY

RE: DUAL on subqueries or on join

2003-11-13 Thread edson . richter
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 quer

RE: DUAL on subqueries or on join

2003-11-13 Thread Becker, Holger
[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

DUAL on subqueries or on join

2003-11-13 Thread edson . richter
Hi! 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 execut