Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: stairway to T-SQL DML Level 10: Changing Data with the UPDATE Statement

    Good article.

    Listing 7 is an incorrect script. It is a repeat of Script 6.

  • RE: What a View

    My biggest peeve with SQL developers who publish articles (in general, not just this author) is the laziness shown by not matching the case of all object names.

    Please take the...

  • RE: GetDateTimeString Function

    An Alternative:

    ALTER FUNCTION [dbo].[GetDateTimeString]

    (

    @inDateTime datetime

    )

    RETURNS varchar(12)

    AS

    BEGIN

    DECLARE @DateString varchar(12), @Hours varchar(2), @Minutes varchar(2)

    SELECT@Hours = CONVERT(varchar(2), DATEPART(hour, @inDateTime)),

    @Minutes = CONVERT(varchar(2), DATEPART(minute, @inDateTime)),

    @DateString = CONVERT(varchar(8), @inDateTime, 112) +

    STUFF('00', 3 - LEN(@Hours),...

  • RE: GetDateTimeString Function

    I would construct a function like this for the same purpose.

    Not so easy to read but I think it is probably a little more efficient.

    /*

    DECLARE @dtest NVARCHAR(14)

    SET

Viewing 4 posts - 1 through 4 (of 4 total)