Forum Replies Created

Viewing 15 posts - 106 through 120 (of 7,164 total)

  • RE: Potential presentation idea: Groupthink: the silent organization killer

    I'd attend. I think there is a razor thin line between being a team player and carrying out the broader plan even when some implementation details may be suboptimal and...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Opinions on triggers

    A couple places I willfully employ triggers:

    1. maintaining audit columns like last modified date and user

    2. copying modified or deleted rows to an audit table or shadow-history table

    I see it...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Performance Issue From Temp Table

    Stylez (3/23/2016)


    Good Afternoon Guys,

    I would like to ask is there a way for me To Optimize the way i insert My Data from A Temp Table To A Sql Table....

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: FOR XML Path

    ringovski (3/23/2016)


    Hi,

    I have inherited a report from a old colleague and you can see that he has used the FOR XML Path command for one of the columns previous approvers.

    The...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    OceanDrop (3/23/2016)


    Very interesting! Good to know! Thanks for the sample and I will definitely keep this in mind from moving forward!

    Btw, the technique that I provided, do not use the...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    OceanDrop (3/23/2016)


    Thank you so much for the response! About the concatenate strings with Order by clause technique,

    I am not aware of any cases where this might not be reliable....

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    roman.asadovsky (3/23/2016)


    Unfortunately this doesn't solve the problem with nested INSERT INTO ... EXEC procedures since it uses same technique.

    Agreed. I did not really attempt to achieve that. To my knowledge...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    dave hants (3/23/2016)


    Great little article Orlando. And a nice neat trick for what I find is a common requirement.

    </ soapbox on

    It's just a shame that Microsoft don't have a...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    OceanDrop (3/22/2016)


    Thank you so much for sharing, this is great! As I am new to XML in SSMS, I was able to understand it but I am not sure if...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    ScottPletcher (3/22/2016)


    Excellent article! My only additional suggestion would be to put your code in the master db, and start the proc name with sp_, so that the code can...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    the sqlist (3/22/2016)


    And because the whole "trick" is using the dm_exec_describe_first_result_set_for_object function I directly tried it with sp_who and sp_who2 and again, for sp_who2 doesn't work, it returns on empty...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    the sqlist (3/22/2016)


    This doesn' work:

    SELECT

    *

    INTO #result

    FROM

    OPENQUERY([LOCALHOST], 'EXEC sys.sp_who;')

    select * from #result

    Msg 7202, Level 11, State 2, Line...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    Jeff Moden (3/22/2016)


    @orlando,

    Very well done. Thanks for taking the time to write up this very useful and awesome technique. Heh... it took some imagination. 😀

    The praise is much...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    gshouse (3/22/2016)


    If you want to make this super-robust a guard that tests if sys.dm_exec_describe_first_result_set_for_object can determine the metadata could be worthwhile. For example, using this technique for sp_who2 does...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • RE: Insert Stored Procedure Results Into New Table Without Using OPENQUERY

    Mike Is Here (3/22/2016)


    You offer a very creative solution that has the ability to have dynamic columns. However, practically since you almost always need to know the columns names any...

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 15 posts - 106 through 120 (of 7,164 total)