Forum Replies Created

Viewing 15 posts - 1,696 through 1,710 (of 2,462 total)

  • RE: What would Fill Factor Do?

    I just had an external Vendor call and mention they want to change the Fill Factor setting for a server.

    In my experience it's better to leave the the server setting...

    "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: Drop Unused indexes?

    Although the user seeks, user scans and userlookups are all 0 the user updates is definitely a lot. I am thinking to speed up updates on subscriber these indexes are...

    "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: Convert SQL data or Flat File or Csv File to XML ?

    Phil Parkin (5/3/2009)


    Have a look here for an example of how it can be done.

    http://blogs.conchango.com/jamiethomson/archive/2006/07/11/4209.aspx

    Blog is down :crying:

    "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: New query option is not visible in SQL Server 2000

    Forgive me if I'm wrong (it's been a while and I'm going by memory here). You can go to Start > Run (or Windows key + R in windows 8+)...

    "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: Split row on two

    I think this should do the trick:

    WITH t1 AS

    (

    SELECT * FROM #Test1

    CROSS APPLY (VALUES ('Actual'),('Budget')) ab(RecType)

    )

    SELECT

    RecType,

    recID, MyDate,

    CASE...

    "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: Convert Datetime to TIME

    1. The TIME datatype does not exist in 2005 (it was introduced it 2008)

    2. Your query appears to have been cut off.

    "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: Using WHILE to avoiding Cursor

    It's also worth noting that sometimes a cursor performs much better than a loop (e.g. the WHILE logic that you are using).

    That said, and has already been mentioned, 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: iterate

    DECLARE @i tinyint = 1;

    WHILE @i <= 5

    BEGIN

    If exists (select fieldID from #tmploginfo where status <> 0

    group by fieldID

    having count(*) > 0)

    begin

    backup log rdb to disk = N'C:\rdb1.trn'

    End;

    SET...

    "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: DISTINCT use on views problem

    mattech06 (3/19/2015)


    Hi,

    I seem to have an odd situation.

    I have a view that when created holds about 40k of rows.

    when I use

    SELECT DISTINCT RefTypeWord FROM vw_Referrals where ClientRef = 'EPS' or...

    "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: DISTINCT use on views problem

    twin.devil (3/20/2015)


    All the question you have asked means you yet to get to know the working of sql server. i have share you some links to understand what is what....

    "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: using a subquery

    Sorry, I completely misunderstood your requirement. I will look at this again later today.

    "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: T-SQL and CLR types for return value do not match

    You're returning a Table Valued Function so you need to return a IEnumerable (Note: CLR Table-Valued Functions)

    I have not written a CLR in a while but I think that

    public...

    "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: using a subquery

    If by "remove log files" you want to delete the records in tempsysdatabase where the names are: rdb_log3 and rdb_log4

    This should work:

    DELETE FROM #tempsysdatabase

    WHERE name IN

    (

    select #tempsysdatabase.name, count (#temploginfo.FieldId) 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: Grey out a paramter based on the value of another parameter?

    jbalbo (3/19/2015)


    Hi Alan

    Thanks for getting back so quick.

    I get most if it, just a bit confused on the dataset part.

    Here is the dataset I am using, if you could incorporate...

    "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: Grey out a paramter based on the value of another parameter?

    I don't believe that you can disable/enable a parameter (I could be wrong but I am pretty sure that you can't).

    One thing you can do is this:

    You have a parameter...

    "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 - 1,696 through 1,710 (of 2,462 total)