Database Toolbox select a certain date error datatypeconflict criteriastatement
Mostrar comentarios más antiguos
Dear all who it may concern!
I created an SQL-Statement which selects an ID from a certain date. The SQL-Statement is pretty much this Format (The Original is much longer, yet the error message can not be due a spelling mistake!):
SELECT Table.ID_Table FROM Table WHERE Table.Date = '2017-05-02 00:00:00.0';
I get an error that states: (to be read in German accent!) Invalid Cursor: [Microsoft][ODBC-Treiber für Microsoft Access] Datentypenkonflikt in Kriterienausdruck.
(to be read in propper english accent) Invalid Cursor: [Microsoft] [ODBC-Driver for Microsoft Access] Datatypeconflict in criteriastatement.
When I try to make a selection with the 'MATLAB Database-Browser' i get the same error message! It is unusual, that ín the browser i get a different dateformat than in Access. In Access the format is 'DD.MM.YYYY' while in the browser I get 'YYYY-MM-DD HH:MM:SS.S'. I couldnt figure out how to Change it in MATLAB, therefore i changed the dateformat in Access to the same in MATLAB. Changing the Prefered date and time Format in MATLAB had not the wanted effect. I allready tried to convert the date in the statement with str_to_date, CONVERT, to_date etc.. Yet i allways get an error that it doesnt recognize These functions....
My thought is, that MATLAB doesnt recognize that I want to give him a date.
My MATLAB Version is:
>> ver ---------------------------------------------------------------------------------------------------- MATLAB Version: 9.1.0.441655 (R2016b) MATLAB License Number: 966221 Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 14393) Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode ---------------------------------------------------------------------------------------------------- MATLAB Version 9.1 (R2016b) Database Toolbox Version 7.0 (R2016b) MATLAB Compiler Version 6.3 (R2016b) Signal Processing Toolbox Version 7.3 (R2016b)
Respuesta aceptada
Más respuestas (1)
Mobby
el 3 de Mayo de 2017
0 votos
Categorías
Más información sobre Database Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!