Forum Replies Created

Viewing 3 posts - 61 through 63 (of 63 total)

  • RE: Datetime SQL Programming

    Depending on whether your data will eventually span multiple years you may want to either add DATEPART(year, Date_occur) or add a WHERE condition if it is important to determine which...

  • RE: How to list top 10 from a stored procedure?

    You beat me to it, Dan. I was just going to suggest using the TOP keyword.

  • RE: Play around the Datetime data

    Try this one:

    SELECT [ID], Message, Date_and_Time

    FROM <Table Name>

    WHERE Date_and_Time >= CONVERT(DATETIME, '20060501')

    If your table is indexed on Date_and_Time, this should be able to use that index.

Viewing 3 posts - 61 through 63 (of 63 total)