Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have connect my Qlikview to a ODBC SQL server.
Example:
SQL SELECT `date_hi`,
FROM aabridge.`Call_hi`
Then i get all the dates. The format of the dates are in "Datetime" so. "YYYY-MM-DD HH-MM-SS".
Now i want to make a select so i get the years and the month, and that should be easy so i try:
SQL SELECT datepart(yyyy, `date_hi`) AS Year,
datepart(mm, `date_hi`) as Month,
FROM aabridge.`Call_hi`
But then i get SQL error when i try to load saying:
SQL##f - SqlState: 37000, ErrorCode: 1064, ErrorMsg: [MySQL][ODBC 5.1 Driver][mysqld-4.1.20]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(yyyy, `date_hi`) AS Year,
datepart(mm, `date_hi`) as Month,
FROM aabridge' at line 1
SQL SELECT datepart(yyyy, `date_hi`) AS Year,
datepart(mm, `date_hi`) as Month,
FROM aabridge.`Call_hi`
Can someone please help me?
Thank you!
I see, that is actually quite beautiful!
Thank you!