Forum Replies Created

Viewing 15 posts - 31 through 45 (of 428 total)

  • RE: Does T-SQL have a means of iterating over the columns of a table?

    In the trigger code presented by segiy, any applications and users are inserted into their respective tables with every run, if they are found not to exist yet:

    INSERT INTO dbo.Audit_User...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: how to count number of student

    Jason A. Long (5/16/2016)


    RV16 (5/13/2016)


    Thanks.

    You mean If I want to count number of students according to crs_cde then I should write like this

    count(sch.id_num) OVER (PARTITION BY ss.CRS_CDE) "No of student"

    I...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Tabata Practicing For Muscle Density And Gaining Lean Muscle

    reported



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: This is a surely understood hadith

    reported



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Rows duplicating for each person

    I have some idea of where you're probably going wrong, but indeed, having your tables in a test database on my machine would make it so much easier to show...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: renuvacellsite.net/regal-slim-and-regal-trim/

    reported



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: renuvacellsite.net/regal-slim-and-regal-trim/

    reported



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Furniture For Sale Tamworth UK

    reported



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Help Using Cursor

    and yet it is still lots better if you would get rid of the cursor. I know it is easy to stop now, but you should REALY do without that...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Rows duplicating for each person

    Hello b.grove,

    Which of those tables are 'the 3 document tables' you refer to? And what are the column names that indicate their version?



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Rows duplicating for each person

    Lynn Pettis (5/12/2016)


    Thought I'd reformat your code some and replace the 3-part naming convention you used with 2-part naming using table aliases. This is important as Microsoft has deprecated...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Help Using Cursor

    The other replies about cursors being slow are all completely correct, so better steer away from them using almost any alternative given. But the original problem is probably rather easily...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Does T-SQL have a means of iterating over the columns of a table?

    J Livingston SQL (5/9/2016)


    Sergiy (5/9/2016)


    J Livingston SQL (5/8/2016)


    ok.

    The original code was found on the web http://www.nigelrivett.net/SQLTriggers/AuditTrailTrigger.html

    can you please provide sample to code to explain what you mean?

    Many thanks

    Sorry, did not...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Does T-SQL have a means of iterating over the columns of a table?

    Seriously, I see it was suggested before, did you have a look at CDC (Change Data Capture)? BOL: https://msdn.microsoft.com/en-us/library/cc645937.aspx. This technology provides -though only available in the enterprise and...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: strange problem with varchar(8000) getting cut at 4000 characters

    I know this doesn't answer your question, but why don't you just generate your statements as nvarchar(max)? You'll be giving the dynamic sql generated as a parameter into sp_executesql (bol)...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

Viewing 15 posts - 31 through 45 (of 428 total)