Forum Replies Created

Viewing 15 posts - 1,756 through 1,770 (of 2,462 total)

  • RE: Dynamically Query a 100 Million Row Table-Efficiently

    Absolutely Brilliant article Gary, 5 stars! I really enjoyed the discussion about TVFs. Very good work sir!

    "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: Centralized SSRS instance using multiple data sources

    Ditto what Gazareth said...

    Do many shops use this design?

    My experience has been - yes.

    "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: I wanna be a DBA! What should I do?

    SQL Server Central is a goldmine. Read the stairways (which has already been mentioned), the blogs and the free redgate press books (especially the "Accidental DBA book".)

    I would suggest...

    "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 problem

    Anything that is not in the form of: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx where x is a hexadecimal value (e.g. 0-9 A-F) is going to fail... are c.evs_OrderIDid and b.ORdernumber formatted like that?

    why...

    "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 and GPX data (from RunKeeper)

    Building on Eirikur's solution here's a couple ways to do this without the outer apply...

    If there only 1 trk element and only 1 trkseg with trkpt child elements you could...

    "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 default start / end date parameters to first / last day of current month?

    Couple things to note...

    First, 2008 R2 has an EOMONTH function.

    Second, if you want to assign those values using SQL and not an SSRS expression you could 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: SSRS Portability similiar to SSIS

    Bummer, I don't know anything about Dynamics. 🙁

    "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: SSRS Portability similiar to SSIS

    If I am not mistaken (forgive me, I have not done this in awhile) you can use a shared datasource. Say you have a shared datasource called DS1... You would...

    "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 a column of xml files

    Ok, I put together some sample data that emulates (crudely) what it is I think you are working with... in the script below there is a table that contains multiple...

    "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: parseing xml string

    clucasi (2/12/2015)


    I have a sql table with the following information in one of the columns

    <CallSing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><CallSign><FRSID>BG</FRSID><DeploymentGroup>SALF</DeploymentGroup><Eastings>384779000</Eastings><Northings>399005000</Northings><CurrentLocation>PRINCESS STREET MANCHESTER</CurrentLocation><HomeStation>G80</HomeStation><CurrentStationGround>G80</CurrentStationGround><LastStatusTimeStamp>20150210083237GS</LastStatusTimeStamp><CallSign>GA011</CallSign><ResourceType>AM</ResourceType><CurrentResourceStatus>AV</CurrentResourceStatus></CallSign>

    <CallSign><FRSID>BG</FRSID><DeploymentGroup>SALF</DeploymentGroup><Eastings>396033000</Eastings><Northings>405503000</Northings><CurrentLocation>ROUNTREE HOUSE MANCHESTER STREET OLDHAM OL96HQ</CurrentLocation><HomeStation>G80</HomeStation><CurrentStationGround>G80</CurrentStationGround><LastStatusTimeStamp>20150203153228GS</LastStatusTimeStamp><CallSign>GA012</CallSign><ResourceType>AM</ResourceType><CurrentResourceStatus>AV</CurrentResourceStatus></CallSign>

    Your request is a little ambiguous. What data...

    "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: Do we really need maintenance plans

    Like many people I started out using maintenance plans then began writing my own scripts. Like Grant said, there's nothing that a maintenance plan does that you can't script out....

    "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 a column of xml files

    There are certainly a few things you can do to improve this. Can you post a sample XML file?

    "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: Is table compression suitable to reduce I/O ?

    So I think of to compress the table with the aim of reducing I/O.

    Compression will help reduce I/O

    1. is that really suitable for this requirement?

    Yes

    If So which compression is...

    "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: IMprove performance

    Note the article in my signature about best practices on getting help. We would need some DDL to help you out. If you could attach the execution plan that would...

    "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 return top n and sum up the rest

    Here's what I came up with (Assuming this is what you are asking for).

    -- SAMPLE DATA

    DECLARE @salesbycategory TABLE (category varchar(20) not null, totalamt int not null);

    INSERT @salesbycategory

    SELECT *

    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

Viewing 15 posts - 1,756 through 1,770 (of 2,462 total)