Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 2,458 total)

  • RE: Finding Missing values

    thomashohner (7/16/2013)


    Micky you are one awsome dude! Worked like a charm:w00t: I had to get this list the old fashion way by hand comparing lists in excel and then...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Finding Missing values

    First, welcome to the SSC forums. This is a great place to get help and for someone looking to grow their SQL skills.

    Note the link in my signature line for...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Query The start up type of a service

    Here's how you can do it without PowerShell. Note that, in the code below, I am only getting the information for the SQL Service Account. The steps will be similar...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Help needed for Select Query

    No problem.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: stored procedure keeps spinning

    I would start here: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/%5B/url%5D

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Updating SQL table using SSRS

    ARGH!!!! I just attempted to post a detailed response, got an error and lost what I wrote. Forgive any errors and typos:

    First, SSRS is not designed for this kind of...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Replication DB - Dead lock issue

    The best way to resolve deadlocks is adding the trace flag as Wolfgang mentioned. That said, when you are dealing with Replication I strongly suggest you become familiar with the...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: which version sp should i install on my SQL Server 2008 r2 (RTM); 64 bit.

    It's best to have the most current Service pack; Service Pack 2 is the most recent service pack for SQL Server 2008 R2.

    See this article for more details.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Error when trying to compress the backup

    Barcelona10 (7/9/2013)


    It is available.Trust me

    Compression is available, my bad. I did not see that you were on 2008 R2.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Error when trying to compress the backup

    You are using Standard Edition. I don't believe that Compression is available in Standard Edition.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Parsing the XML

    Here's the code to turn the XML code in #2 into a table...

    DECLARE @Pt TABLE (x XML not null);

    INSERT INTO @Pt

    SELECT '<Movie><MovieName>ABCD</MovieName><Genre>Horror</Genre></Movie>

    <Movie><MovieName>EFGH</MovieName><Genre>Sci-Fi</Genre></Movie>

    <Movie><MovieName>IJKL</MovieName><Genre>Comedy</Genre></Movie>';

    SELECT m.value('(MovieName/text())[1]', 'varchar(20)') AS Movie,

    m.value('(Genre/text())[1]',...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Running Total Query

    Glad to help 🙂

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: What is # in first letter of table names?

    HanShi mentioned local and global temp tables. You don't see this as often but a global temp table has two numbers signs in front of it like so: ##temptable.

    To...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Running Total Query

    The COALESCE method for running totals is terribly slow. Working with the link that Sean posted, here is an example of how to accomplish this using the "Quirky Update" method....

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Help needed for Select Query

    Based on the information you provided this may be what you are looking for:

    USE tempdb;

    IF OBJECT_ID('tempdb..Customer') IS NOT NULL

    DROP TABLE Customer;

    IF OBJECT_ID('tempdb..CustomerDetails') IS NOT NULL

    DROP TABLE CustomerDetails;

    IF OBJECT_ID('tempdb..TargetActivity') IS NOT...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 2,191 through 2,205 (of 2,458 total)