Forum Replies Created

Viewing 15 posts - 571 through 585 (of 2,458 total)

  • RE: How do you know when it is time to leave a job?

    If you're a good DBA, Developer or Architect it's time to go when you don't love what you're doing. The market is too starved for talent to be at a...

    "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: Table joins

    amanspschauhan (7/25/2016)


    Hi All,

    I have two Tables as shown below-

    Details-

    Company Name CEO ID Manager ID

    A ...

    "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: Combine 9 SSRS reports into one report

    not all reports will use the same date parameters, fortunately all of the reports have same parameter names.

    First, can you clarify what you mean here?

    •Would all the 9 reports...

    "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: Better method for computed column?

    mike 57299 (7/25/2016)


    Unfortunately, your suggestion is greek to me. Can you explain a bit more? And yes, it is killing performance.

    Thank you.

    I was going to suggest that you create...

    "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: Better method for computed column?

    Luis Cazares (7/25/2016)


    What are you using the product_stat table for? Will you have more than a row per product? Will it keep history? If it'll always show the products in...

    "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: Better method for computed column?

    Scalar functions for computed columns or constraints will hurt performance too. For one, queries that reference the table that uses a scalar udf for the computed column will likely be...

    "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: Are the posted questions getting worse?

    Maybe it's Monday a Monday morning thing but even the small things are annoying me today. Just ran accross this:

    [Gender] varchar(100) NULL,

    "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: Additional Data Files and Proportional Fill

    Great work David. Very interesting, I was not aware that you could do this with Extended Events.

    "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: URGENT Please -Substring Formation in SQL SERVER 2014

    If we're busting out splitters then another way would be using PatternSplitCM[/url].

    DECLARE @SomeTable TABLE (SomeString varchar(100));

    INSERT @SomeTable VALUES ('Recalc 2015659341589653'),('Recalc of 2015658926358915 revised'),

    ('Recalc to clm 15649687415315781536 error');

    SELECT SomeString, Item

    FROM...

    "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: Repetitive Tasks Please Help on Populating Table

    no prob. 😛

    Read up on tally tables if you don't know about them. They're an invaluable tool.

    "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 to search exact match case

    One approach using the DelimitedSplit8K_LEAD[/url]:

    DECLARE @searchstring varchar(100) = '2,5';

    SELECT searchstring = @searchstring, [count] = COUNT(*)

    FROM

    (

    SELECT c.ComponentInfoID, mx, [count] = COUNT(*)/mx

    FROM ComponentInfoID c

    CROSS APPLY dbo.DelimitedSplit8K_LEAD(c.ComponentInfoID,',')...

    "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: Repetitive Tasks Please Help on Populating Table

    This is a job for a tally table[/url]!

    Here's a crash course on how they work. Run this:

    SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL))-1 FROM

    (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) a(x), -- 10

    (VALUES...

    "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: URGENT Please -Substring Formation in SQL SERVER 2014

    Another couple options:

    1. You can use DigitsOnlyEE[/url]. This exactly the type of task it was designed for (note my comments):

    -- How to use dbo.DigitsOnlyEE

    SELECT DigitsOnly FROM dbo.DigitsOnlyEE('Recalc 2015659341589653');

    SELECT DigitsOnly FROM...

    "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 add a constraint to a column

    ALTER TABLE employees

    ADD CONSTRAINT check_length

    CHECK (LEN(fieldname) < 1)

    Should be

    ALTER TABLE employees

    ADD CONSTRAINT check_length

    CHECK (LEN(fieldname) = 1)

    But this could be handled by using a nullable char(1) data type:

    ALTER TABLE employees

    ALTER...

    "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: Background Color Expression

    PB _BI touched on this...

    I'm assuming you're attempting to use that expression in a text box properties/color setting... you can put a color or expression in there. if it...

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