Forum Replies Created

Viewing 15 posts - 1,291 through 1,305 (of 5,841 total)

  • RE: Try Catch doesnt work

    1) If you want to find/log differences in collations you can use various system objects to see the collation settings for different items. Just write queries to compare what is...

  • RE: thinking about Procedure vs trigger

    Not enough description for us to really advise.

    Triggers and sproc both have their place.

    As does WITH (NOLOCK). However, to say that using that is not without problem is REALLY MISGUIDED/MISINFORMED!!...

  • RE: Retrieving data per time interval help

    can you please provide us with usable sample data (that covers all expected scenarios) and expected output?

  • RE: Profiler filter question

    The Grateful DBA (2/17/2016)


    Read through that a couple times Kev, it appears the logical operator applies to multiple filters within the same column. My goal is OR's between filters...

  • RE: Profiler filter question

    sp_trace_setfilter - https://msdn.microsoft.com/en-us/library/ms174404.aspx

    See Logical Operator flag.

  • RE: Scheduling Job Steps

    Orlando Colamatteo (2/16/2016)


    TheSQLGuru (2/16/2016)


    Just have a job step that starts the next job you want to run AFTER the completion of the first job. Easy-peasy-lemon-squeezy! 🙂

    sp_job_start is the sproc IIRC....

  • RE: stored procedure for disabling then enabling indexes

    Adding a new index REALLY should be part of a controlled, documented process, and source controlled too. And as part of that the impact analysis will make sure that your...

  • RE: Scheduling Job Steps

    Just have a job step that starts the next job you want to run AFTER the completion of the first job. Easy-peasy-lemon-squeezy! 🙂

    sp_job_start is the sproc IIRC. You could also...

  • RE: stored procedure for disabling then enabling indexes

    1) What's the purpose of this evolution? I presume you modify a sufficient fraction of data each day that it is worth it to do this? Personally I just prefer...

  • RE: creating a trigger to update a record

    Try Books Online (https://msdn.microsoft.com/en-us/library/ms189799.aspx) - it is a great resource. Also, I recommend a beginners book on TSQL (Wrox has a good one IIRC).

  • RE: High Average Wait Time

    I agree with Eddie (big surprise - Hi Eddie!!). 🙂

    Waits are cumulative in SQL Server, so they are pretty useless just looking at them in isolation. What you need to...

  • RE: Adding quotes to dynamic SQL

    Brandie Tarvin (2/12/2016)


    TheSQLGuru (2/11/2016)


    Whenever I am building out dynamic SQL I always use SET QUOTED_IDENFITIER OFF first and then use double quotes in the outer sections of text. Then I...

  • RE: Stored Procedure Performance

    richkdcpud (2/11/2016)


    Evironment:

    SQL2012

    Virtual machine running VMWare and running on its own host

    Windows Server 2012 R2

    96GB Ram

    A developer wrote the following Stored Procedure to insert data into a table. He is...

  • RE: Adding quotes to dynamic SQL

    Whenever I am building out dynamic SQL I always use SET QUOTED_IDENFITIER OFF first and then use double quotes in the outer sections of text. Then I never have to...

  • RE: Return unique rows

    micang (2/11/2016)


    SQL 2008 R2

    Hi All,

    If I have a query like so:

    select contractno, Address1,dateJoined,DateLastTrans

    from tableTest

    where datejoined between 2012-12-01 and 2015-12-31

    and my results are:

    Contractno,address1,datejoined,dateLastTrans

    387, johnroad, 2013-06-01,2016-01-25

    267, bobroad, 2015-12-01,2016-01-25

    267, bobroad, 2015-12-01,2015-12-28

    578, ellenroad,...

Viewing 15 posts - 1,291 through 1,305 (of 5,841 total)