freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: <mitch AT mdmiller.com>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: CONVERT and MSSQL
- Date: Mon, 11 Mar 2002 10:46:18 -0600 (CST)
Or how about
SELECT *
FROM table
WHERE datecol >= '3/1/2002'
AND datecol < '4/1/2002'
This scenario would allow use of an index, which I think none of the
others would since they're not SARGs.
-- Mitch
On Mon, 11 Mar 2002, Kaeptn Weltall wrote:
> try
>
> select * from table_name
> where datepart(yyyy,column_name) = 2002
> and datepart(mm,column_name) = 3
>
> what will spare you dependence on stringoutput format
> of datetime and good deal of processing time.
>
> ---
> You are currently subscribed to freetds as: [mitch AT mdmiller.com]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
-
CONVERT and MSSQL,
Mark, 03/11/2002
- <Possible follow-up(s)>
- RE: CONVERT and MSSQL, Matthews Simon, 03/11/2002
- Re: CONVERT and MSSQL, Kaeptn Weltall, 03/11/2002
- Re: CONVERT and MSSQL, Joshua Stein, 03/11/2002
- Re: CONVERT and MSSQL, mitch, 03/11/2002
- Re: CONVERT and MSSQL, Winkless, Geoff, 03/11/2002
- Re: CONVERT and MSSQL, Winkless, Geoff, 03/11/2002
Archive powered by MHonArc 2.6.24.