N
Neil Evans-Mudie
Guys,
Hi there. I am trying to query a text file (via MS Query) such that the
first field contains a date represented as a string (e.g. '2005-05-02
12:00:00'). I want this field to be represented in excel as datetime.
My MSQuery is like:
SELECT cast('2005-05-02 12:00:00' as date) as MyDatetime FROM
`C:\TEMP\PerfdataTest`\FspEbsApps1_AllWithHdr.csv FspEbsApps1_AllWithHdr
(via ODBC Text driver)
but returns the following error:
syntax error (missing operator) in query expression 'cast('2005-05-02
12:00:00' as date)'
I have tried replacing 'as date' with 'as sql_date'; 'as sql_c_date'; 'as
sql_timestamp'; etc, etc.
Help - please if anybody could offer some advice around MSQuery/ODBC
CAST/CONVERT function syntax I'd be immensly grateful.
--
Cheers,
Neil Evans-Mudie
-. . .. .-.. / .----. ... --- -. .. -.-. .----. / . ...- .- -.
.... -....- -- ..- -.. .. .
e: (e-mail address removed) address is a spam sink
If you wish to email me, try neilevans underscore mudie at hotmail dot com
w: http://groups.msn.com/TheEvansMudieFamily/_whatsnew.msnw?&pps=k
Hi there. I am trying to query a text file (via MS Query) such that the
first field contains a date represented as a string (e.g. '2005-05-02
12:00:00'). I want this field to be represented in excel as datetime.
My MSQuery is like:
SELECT cast('2005-05-02 12:00:00' as date) as MyDatetime FROM
`C:\TEMP\PerfdataTest`\FspEbsApps1_AllWithHdr.csv FspEbsApps1_AllWithHdr
(via ODBC Text driver)
but returns the following error:
syntax error (missing operator) in query expression 'cast('2005-05-02
12:00:00' as date)'
I have tried replacing 'as date' with 'as sql_date'; 'as sql_c_date'; 'as
sql_timestamp'; etc, etc.
Help - please if anybody could offer some advice around MSQuery/ODBC
CAST/CONVERT function syntax I'd be immensly grateful.
--
Cheers,
Neil Evans-Mudie
-. . .. .-.. / .----. ... --- -. .. -.-. .----. / . ...- .- -.
.... -....- -- ..- -.. .. .
e: (e-mail address removed) address is a spam sink
If you wish to email me, try neilevans underscore mudie at hotmail dot com
w: http://groups.msn.com/TheEvansMudieFamily/_whatsnew.msnw?&pps=k