SQL MAX function error

tartan

Member
Hi ! With SQLTools or TOAD this SQL command :

"SELECT A.CUSTOMER_ID, MAX(A.SALE_DATE) FROM CUSTOMERS A
WHERE A.SALE_DATE BETWEEN '01.01.2001' AND '31.03.2001'
GROUP BY A.CUSTOMER_ID"

executes correctly, but with DOAD its say :
"ORA-01830:date format picture ends before converting entire input string
ORA-02062
tongue.gif
receding line from..."

Can I solve this problem ?
 
Yes, You can!

Don't put Your date-parameters as string - this could make trouble in different language settings. The better way in handling date values is to use the built-in date-conversion functions.
E.g. to_date ('08.03.2001', 'dd.mm.yyyy')
 
Back
Top