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
that's the error i get when i use that code
Spoiler
DataSource.Error: ODBC: ERROR [HY000] [SAP][Advantage SQL Engine][ASA] Error 7200: AQE Error: State = S0000; NativeError = 2121; [SAP][Advantage SQL Engine]Column not found: date -- Location of error in the SQL statement is: 61 (line: 4 column: 17)
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=mmStatistik
OdbcErrors=Table
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=mmStatistik
OdbcErrors=Table
richardverburg
7 years agoHelper I
I made a typo this is the correct code:
SELECT * FROM mmstatistik WHERE belegdatum BETWEEN convert(date, getdate()-10) AND convert(date, getdate())