Print Thread
SQL MAX function error
#1774 03/08/01 07:43 PM
Joined: Mar 2001
Posts: 2
Latvia
T
tartan Offline OP
Member
OP Offline
Member
T
Joined: Mar 2001
Posts: 2
Latvia
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 [Linked Image]receding line from..."

Can I solve this problem ?


tartan
Re: SQL MAX function error
#1775 03/08/01 10:53 PM
Joined: Sep 1999
Posts: 27
Germany
K
Member
Offline
Member
K
Joined: Sep 1999
Posts: 27
Germany
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')


Oliver Kaesmann
Re: SQL MAX function error
#1776 03/09/01 03:57 PM
Joined: Mar 2001
Posts: 2
Latvia
T
tartan Offline OP
Member
OP Offline
Member
T
Joined: Mar 2001
Posts: 2
Latvia
Thnks, its work [Linked Image]


tartan

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.030s Queries: 12 (0.008s) Memory: 2.5029 MB (Peak: 3.0422 MB) Data Comp: Off Server Time: 2024-05-14 09:01:43 UTC
Valid HTML 5 and Valid CSS