Forum Discussion
Anonymous
7 years agoNot applicable
SQL Query with Actual Date
Hello, I Have a question. What must I write in the M Statement or SQL Statment to get WHERE explicit Date to NOW Date? Quelle = Odbc.Query("dsn=mmStatistik", "SELECT * FROM mmstatistik#(I...
- Anonymous7 years ago
SELECT * FROM mmstatistik WHERE belegdatum BETWEEN {d '01/01/2018'} AND Date()was rellay simple...and a lucky type...
that works and gives me the actual date
Thanks for alle the help and sorry for the circumstances.
Anonymous
7 years agoNot applicable
SELECT * FROM mmstatistik WHERE belegdatum BETWEEN format(getdate()-10, 'd', 'de-de') AND format(getdate(), 'd', 'de-de')
still...
Spoiler
DataSource.Error: ODBC: ERROR [HY000] [SAP][Advantage SQL Engine][ASA] Error 7200: AQE Error: State = S0000; NativeError = 2158; [SAP][Advantage SQL Engine]Scalar function not found: getdate -- Location of error in the SQL statement is: 60 (line: 4 column: 16)
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=mmStatistik
OdbcErrors=Table
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=mmStatistik
OdbcErrors=Table
guess that GetDate() is not implementet or something :(
Anonymous
7 years agoNot applicable
SELECT *
FROM mmstatistik
WHERE belegdatum
BETWEEN {d '01/01/2018'}
AND Date()was rellay simple...and a lucky type...
that works and gives me the actual date
Thanks for alle the help and sorry for the circumstances.
- richardverburg7 years agoHelper I
What is your source database? Not mssql right? that was my assumption