Re: (Excel & ODBC) Howto compare string and datetime????
From: Dmitri Ivanov (divanov_NOSP_at_M_.aha.ru)
Date: 05/14/04
- Next message: Randy: "Re: odbc Cobol SQL "UPDATE" Example"
- Previous message: Dmitri Ivanov: "Re: odbc Cobol SQL "UPDATE" Example"
- In reply to: Jorch: "(Excel & ODBC) Howto compare string and datetime????"
- Next in thread: Jorch: "Re: (Excel & ODBC) Howto compare string and datetime????"
- Reply: Jorch: "Re: (Excel & ODBC) Howto compare string and datetime????"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 21:54:08 +0400
Hello Jorch,
"Jorch" <jorchrock_1@hotmail.com> wrote:
J> How can I compare string (let's say '2004-12-31 12:00:00') and
J> datetime (or timestamp or whatever odbc calls it)????
J>
J> With PostgreSQL I can do it like (dateCol type is timestamp)
J>
J> SELECT dateCol FROM table
J> WHERE dateCol = '2004-12-31 12:00:00'::timestamp
Please use escape syntax in SQL sentences for timestamp values, e.g.
{ts '2004-12-31 12:00:00'}
J> Is there possibilities to cast types (from datetime to text)
J> to another in Excel file ODBC driver???
For fetching, you could bind the datatime column as SQL_C_CHAR. The driver
will deliver the column values as text.
-- Sincerely, Dmitri Ivanov Common Lisp ODBC interface - www.ystok.ru
- Next message: Randy: "Re: odbc Cobol SQL "UPDATE" Example"
- Previous message: Dmitri Ivanov: "Re: odbc Cobol SQL "UPDATE" Example"
- In reply to: Jorch: "(Excel & ODBC) Howto compare string and datetime????"
- Next in thread: Jorch: "Re: (Excel & ODBC) Howto compare string and datetime????"
- Reply: Jorch: "Re: (Excel & ODBC) Howto compare string and datetime????"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|