Forum Replies Created

Viewing 15 posts - 46 through 60 (of 85 total)

  • RE: What happens to a variable after COMMIT or ROLLBACK

    Easy one. Thanks.

  • RE: Hekaton

    Nice way to end the weekend. Good question.

  • RE: T-SQL counts

    Count returns count of unique non null values. Easy one.

  • RE: Truncate

    Learned something new. Thanks for the question.

  • RE: Executing Dynamic SQL

    L' Eomot Inversé (9/27/2013)


    ksatpute123 (9/26/2013)


    Extended stored procedures are stored procedures that call functions from DLL files. That is why you cannot see the internal code for this. However, extended stored...

  • RE: Filestream data

    Easy one. Thanks.

    Just to close the gaps, the option should have been VARBINARY(MAX) instead of just VARBINARY because anything else like VARBINARY(N) {N being a natural number up to...

  • RE: Executing Dynamic SQL

    crussell-931424 (9/26/2013)


    I'm not familiar with this. My management studio tells me it is an extended stored procedure. What's that? Where do I go or how do I see the sql...

  • RE: Executing Dynamic SQL

    ronmoses (9/26/2013)


    Toreador (9/26/2013)


    I knew it was going to fail due to the data type, but any of the options was feasible so it came down to a guess as to...

  • RE: Executing Dynamic SQL

    etsav (9/26/2013)


    It should be underlined that this

    [font="Courier New"]DECLARE @STR VARCHAR(8000) = N'SELECT * FROM sys.objects'

    EXECUTE SP_EXECUTESQL @STR[/font]

    works on MSSQL 2008 -->

    On MSSQL 2005 it returns

    [font="Courier...

  • RE: Executing Dynamic SQL

    Stuart Davies


    Nice and easy today - thanks

    Knew the answer to this through bitter experience Smile

    +1.

  • RE: CTE

    Nice tick putting 5 after 3. Almost got me. Nice question.

  • RE: Better way to write this query

    dwain.c (9/23/2013)


    How about one of these 2 options? At least they don't do the CONVERTs twice.

    INSERT INTO ReportRecipients

    SELECT rs.[ReportID]

    ,rs.[ATID]

    ...

  • RE: Dynamic Query

    I had to think about it for a while before answering. Good one.

  • RE: Better way to write this query

    I tested the result for both the queries. The result was with not much difference taking the same time. This was due to the volume of data. At high volumes...

  • RE: Better way to write this query

    WITH cte_insert_report_recipients

    AS

    (

    select a.*,CONVERT(VARCHAR(10),a.[ATID])

    + CONVERT(VARCHAR(10),[AID])

    + CONVERT(VARCHAR(10),a.[ReportID])

    + CONVERT(VARCHAR(10),a.[Frequency])

    + CONVERT(VARCHAR(10),a.[RecipientId])

    + CONVERT(VARCHAR(10),a.[DeliveryMethod]) [ID] from ReportSchedules a

    )

    insert into ReportRecipients

    select

    b.ReportID,

    b.ATID,

    ...

Viewing 15 posts - 46 through 60 (of 85 total)