Forum Replies Created

Viewing 15 posts - 2,551 through 2,565 (of 5,841 total)

  • RE: Random Number Generator

    It's quicker to write FROM x a, x b than it is to track down the inline tally table code.

    That's what Snippets are for silly! 😀 Actually for...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Help on performance issues using SQL Server 2012

    If you want the system diagnosed and fixed (if possible) ASAP, the ONLY way to do that with any reasonable chance for success is to hire a qualified performance tuning...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Random Number Generator

    ChrisM@Work (5/23/2013)


    Bex (5/23/2013)


    Nice solution btw, Chris.

    Bex

    Gosh, thanks! :blush:

    It truly is an elegant solution Chris! Kudos.

    However, I will nit-pick on using sys.columns for the driver. 😎 That gets...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Creating a Custom Function (Scalar)

    +100 to Lynn!!

    Read my chapter in the SQL Server MVP Deep Dives 2 book entitled "Death by UDF" 😎

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Finding the most recent value for many record in a detail table (optimizing)

    tl;dr

    1) I think pre-aggregated data will always smoke real-time queries 🙂

    2) since you are on SQL 2012, have a look at LAST_VALUE. It might be a better option than...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: SQL Server High availability step by step guide

    MarvinTheAndriod (5/23/2013)


    Can anyone recommend a good step by step guide/article to setting up high availabilty

    Step 1: Get a QUALIFIED PROFESSIONAL to help you and your company. To do...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Shrink helping performance

    hi2u (5/21/2013)


    I was pretty sure that it's not possible, but i'm not an expert, so i needed a little confirmation first.

    I think i'll go with the coincidence explanation. Thank you...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Convert data to HL7 message

    It can be done, but it is ugly cursor-driven stuff. CLR will likely be a good bit more efficient, but you will have a lot of code to write...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Number of Database in SQL 2012 Instance with AlwaysOn

    Anam Verma (5/21/2013)


    I am involved in project of upgrading database servers to SQL 2012 using AlwaysOn functionality. It is still in planning phase and i am currently working on capacity...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Is there an efficient way to do dynamic sorting within SQL ?

    Not only do you have the dreaded IS NULL OR construct, you also have a bunch of correlated SELECT..(SELECT..) calls too.

    I have had success in examples such as this simply...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Replication - High memory usage when running Snapshot

    vamsi2.k (5/20/2013)


    Hi SQLPhil,

    I am facing a similar issue. I am configuring Merge Replication for a Database of Size 3GB.

    When I run the SnapShot Agent My memory is falling down. I'm...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: How Maintenance Plans are a Big Plus for SQL Server Administration

    I recommend to my clients to never EVER use Maintenance Plans for ANYTHING. All standard/routine database maintenance activities should be done using Ola.Hallengren.com's FREE, FULLY DOCUMENTED, INCREDIBLY POWERFUL/FLEXIBLE scripts!!!...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Which query to be used if IO Stats are different but actual execution time on production is same.

    There are quite a few different things you can "tune" a query to "optimize/minimize": duration, IO, CPU, Memory, locking, etc. In your case it would seem that you...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: How do I use an IF type function within a SELECT statement?

    stuart.hemming (5/9/2013)


    Hello,

    I'm hoping someone can help me with a SQL query I'm trying to write; I'm relatively new to SQL so please bear with me if this is a numpty...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: given a date, tell me how many seconds from 1900

    Here is an interesting solution that could be more efficient (didn't test that):

    select

    DT,

    CAST(dt AS decimal(29,15))*86400 AS decdtsec2,

    SecondsSince_19000101 =

    -- seconds for whole days

    (datediff(dd,0,a.DT)*000000000086400)+

    -- seconds since start of day

    datediff(ss,dateadd(dd,datediff(dd,0,a.DT),0),a.DT)

    from

    (...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 2,551 through 2,565 (of 5,841 total)