invalid identifier. function in where clause wrapped by to_char -
11-08-2007
, 05:36 PM
perhaps tthis select will be very slow and terrrible, but I get
invalid identifier on this line right on the function
monthsfirstattempt.
I know the function works. Any reason I can't do this? I get the error
here:
and
to_char( monthsfirstattempt(o.account_number,'200710'),'yyy ymm' )='200710'
select
main_ani(o.account_number) ANI,
u.creation_date ,
u.nombre,
u.apellido,
o.address,
o.city,
o.st,
o.zip,
o.validation_date CHARGEDATE,
monthsfirstattempt(o.account_number,'200710') FirstAttempt,
o.amount
from orders o, users u
where o.account_number=u.account_number
and ( to_char(o.validation_date,'yyyymm')='200710'
or to_char(o.validation_date,'yyyymm')='200711')
and
to_char( monthsfirstattempt(o.account_number,'200710'),'yyy ymm' )='200710'
and o.account_number
not in
(select m.account_number from mcmlinea m where m.cdani like
'30571799%')
order by o.validation_date
Thanks in advance for any help or information. |