Forum Replies Created

Viewing 3 posts - 16 through 18 (of 18 total)

  • RE: Dynamic SQL

    Regarding your initial question. The length of the @cmd variable may be too short to accept all the dynamic text you are trying to insert. In this case, it would...

  • RE: Which is better? (SQL Server Best Practices)

    Here is another option that could be used:

    where isnull(Message,'') > ''

  • RE: SQL Year and Week numbers

    Here are two more options, one returning an integer value.

    declare @date datetime

    select @date = '01/01/2008'

    select year(@date) * 100 + datepart(week,@date)

    select convert(varchar,year(@date) * 100 + datepart(week,@date))

Viewing 3 posts - 16 through 18 (of 18 total)