Forum Replies Created

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

  • RE: can you show me a better way of doing this...?

    -- I would use dynamic SQL

    -- Just take the PRINT statement out when you are done testing

    -- Good Luck!

    CREATE PROCEDURE spUpdateLookupTable

    @Isbn nvarchar(10),

    @uvalue int,

    @fieldName nvarchar(50)

    AS

    Declare @isbnCount int, @sSQL varchar(2000)

    Select @isbnCount=Count(Isbn) FROM...

  • RE: Datetime help

    Here is a line I use to set the date to the Monday of the current week:

    SET @LockDateBegin = convert(datetime,convert(char(10),dateadd(day,(2 - datepart(weekday,getdate()) + round((1.0 / datepart(weekday,getdate()) - 0.1),0) * (-7)),getdate()),101))

    To...

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