Forum Replies Created

Viewing 15 posts - 481 through 495 (of 2,458 total)

  • RE: How do we get the DEF of a view ?

    Alternatively, you can bypass sys.sql_modules all together and use OBJECT_DEFINITION.

    CREATE VIEW MyView

    AS

    SELECT 1 AS Col1;

    GO

    SELECT OBJECT_DEFINITION(OBJECT_ID('MyView'))

    "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: Splitting Strings in SQL Server 2016

    corey lawson (9/8/2016)


    Hmm... I kind of like the XML-based splitter method, if only because part of the process is it can throw out the data in the output tableset as...

    "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: SQL 2016 Replication

    Budd (9/8/2016)


    Thank you Alan.

    "Not Replicating Triggers" the trigger itself, or the results after a triggered event?

    I was talking about the triggers themselves. I had a situation a few years back...

    "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: SQL 2016 Replication

    Budd (9/8/2016)


    What are the pros and cons that you see for each type of replication in a situation like this?

    Thanks

    The pros are that SQL Server Replication is stable and reliable...

    "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: SQL query permutations using 3 tables without repetition

    Ditto everything Drew said. We'll need more info to help you.

    Perhaps something like this (I did a few permutations based on my best guess of what you need).

    SELECT...

    "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: How do I assign the correct date ?

    turlteman.mike (9/1/2016)


    This looks useful but whrere you have this line

    SELECT TOP (1) calDate MIN(caldate)

    Is the strikethrough deliberate?

    Sorry I almost missed this.

    Yes, I was saying that using MIN seemed...

    "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: Get notified when sql server agent isn't running?

    That means the service is either failing to start and crashing. That's something a DBA or Server Admin would have to look into. A service failing to start or crashing...

    "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: Get notified when sql server agent isn't running?

    Adam Sandler (9/1/2016)


    Thanks Alan - I suppose this is something I should get the local network / support people to set up for me?

    Any settings I can apply to make...

    "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: Data gets truncated and breaked

    Can you provide an example of what you are getting as well as what you should be getting?

    "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: Get notified when sql server agent isn't running?

    Adam Sandler (9/1/2016)


    Basically I have jobs on a server, which I dont control or the hardware its on. I have jobs like backups running. If agent isnt running, the jobs...

    "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: Difference between ROW_NUMBER() and ORDER BY...DESC

    Everyone has touched on this but the most important thing to understand is: the only way to guarantee that results are returned in a specific order is with an ORDER...

    "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: Multi-Dimensional vs Tabular and data security

    pietlinden (8/30/2016)


    Is there a good beginner book on Multi-Dimensional / Tabular? I've been playing with DAX for a while (and I'm still terrible at it!)

    Especially one that covers security/RLS.

    I...

    "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: Multi-Dimensional vs Tabular and data security

    but I'm learning using DAX/PowerPivot/PowerBI. (gotta start somewhere!) and then I watched Brad Gall's presentation on Analysis Services. It's not a new video, but it made me wonder... if you...

    "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: MSSQL As Search Engine

    I don't have enough Postgres experience to say how it compares to SQL Server but if you know what you're doing you can make a search-intense workload move pretty quick...

    "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: Window Function Question - 3 month rolling average

    np!

    "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 - 481 through 495 (of 2,458 total)