Jump to content
Changes to the Jaspersoft community edition download ×

Error Using MONTH (DATE (field)) with DB2


atendimento_3

Recommended Posts

 
 
In need SQL query returns the month of a date that is in a field of type date in my DB2 database
 
Example:
SELECT
MONTH(DATE(DBA.ESTOQUE_SINTETICO.DTMOVIMENTO)) AS MES
 
Exception:
Reason: DB2 SQL Error: SQLCODE=-418, SQLSTATE=42610, SQLERRMC=null, DRIVER=3.69.66
 
Errors in Dataset and Query Dialog:
- missing EOF at ')'
- mismatched input '.' expecting ')'
- missing 'FROM' at 'DATE'
- no viable alternative at input 'MONTH'
- mismatched input '(' expecting ')'

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...