ODBC timestamp formats in T-SQL
- From: DWalker07 <none@xxxxxxxx>
- Date: Mon, 18 May 2009 15:20:16 -0700
This works in SQL 2005 T-SQL:
Select {d '1980-01-01'} As Temp
I understand that this is known as the "ODBC timestamp literal format".
Is this also legal T-SQL? Is it fully supported as T-SQL, deprecated,
recommended, not recommended, or what?
There is an index entry in BOL for SQL 2005 called "ODBC timestamp data",
which oddly enough points to a topic called "ODBC Datetime Format" (even
though "ODBC Datetime Format" doesn't appear in the index). The topic
describes the format and says it can be used by the OLE DB Provider for SQL
Server. Which doesn't make it clear to me that this can be used when
you're writing code in the T-SQL language.
You can put that Select statement into a view and it works fine. I thought
the T-SQL language was separate from ODBC, ADO, OLE DB, etc.!
David Walker
.
- Follow-Ups:
- Re: ODBC timestamp formats in T-SQL
- From: Tibor Karaszi
- Re: ODBC timestamp formats in T-SQL
- Prev by Date: Re: order by month/year
- Next by Date: Re: Deterministic dates
- Previous by thread: Does nesting stored procedures make sense to increase performance?
- Next by thread: Re: ODBC timestamp formats in T-SQL
- Index(es):
Relevant Pages
|