syntax error near unexpected token `TO_CHAR(L'

A

aemi

I fired this query

SELECT TO_CHAR(LST_UPDT_TS, 'MMDDYY'),COUNT(ROWID) FROM
SP_ADDLPAY_DATA WHERE LST_UPDT_TS>TO_DATE('01012007','MMDDYY') GROUP
BY TO_CHAR(LST_UPDT_TS,'MMDDYY');

n I got this error why?

syntax error near unexpected token `TO_CHAR(L'
 
D

Dimitri Kurashvili

I fired this query

SELECT TO_CHAR(LST_UPDT_TS, 'MMDDYY'),COUNT(ROWID) FROM
SP_ADDLPAY_DATA WHERE LST_UPDT_TS>TO_DATE('01012007','MMDDYY') GROUP
BY TO_CHAR(LST_UPDT_TS,'MMDDYY');

n I got this error why?

syntax error near unexpected token `TO_CHAR(L'


if this is Oracle, then everything seems ok.
 
D

Daniel Pitts

I fired this query

SELECT TO_CHAR(LST_UPDT_TS, 'MMDDYY'),COUNT(ROWID) FROM
SP_ADDLPAY_DATA WHERE LST_UPDT_TS>TO_DATE('01012007','MMDDYY') GROUP
BY TO_CHAR(LST_UPDT_TS,'MMDDYY');

n I got this error why?

syntax error near unexpected token `TO_CHAR(L'

Possibly because this is a Java newsgroup, and that appears to be an
SQL statement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top