Forum Replies Created

Viewing 15 posts - 2,086 through 2,100 (of 2,462 total)

  • RE: XML hierarchical data

    Because you are dealing with a one-to-many parent/child node relationship you could start your query with /Root/device/sensor as your context like so:

    (Taking the example code that Mark was nice enough...

    "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: Function vs Direct query

    Though impossible to demonstrate without any DDL for the underlying tables it certainly does look like you can convert your function into a Inline Table Valued function (as has been...

    "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: join/merge 2 status tables (check statuses at any change)

    tomek tomek (10/16/2013)


    Well....

    I kind of have a solution, but it's messy (especially that I acutally have more tables like these to merge, and obviuosly there come joins with other tables).

    Maybe...

    "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: Problem with grouping in SSRS 2008

    joe.wolfe (10/11/2013)


    Yes, exactly....Thank you also for taking the time to respond and help...Joe Wolfe

    Sorry for the late reply, I've been traveling and super-busy but have been meaning to get 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: running tsql from filetable

    I have used the filetable to store the tsql scripts. what can be the best way to run them against the server. the only road block i have using 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: Problem with grouping in SSRS 2008

    joe.wolfe (10/11/2013)


    Thank you for responding to my question and I apologize for taking so long to reply back. I had to have some emergency foot surgery.

    I am in fact...

    "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: Fragmentation doesn't changes after index rebuilding

    sandeep singh-337370 (10/11/2013)


    Guys,

    One of the other project's guys in my company asked me to improve the performance of their databases.

    Keeping your indexes un-fragmented will help performance. That said, 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: String Split and LEFT OUTER JOIN in Two Tables

    Misread OP. Comment removed.:blush:

    "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: Reading XML from column

    cor_perlee (6/17/2013)


    It worked!

    Thanks so much. Really appreciate it 🙂

    Cheers!

    I know I am a little late here but this:

    ;with xmlnamespaces (default 'urn:vim25')

    select t.c.value('(shares)[1]', 'varchar(200)')

    from (table)

    cross apply @xml.nodes('(/obj/cpuAllocation/shares, /obj/memoryAllocation/shares)') t(c)

    is getting all...

    "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 generate dates from sql query in a set of 4

    Koen's query produces a better query plan than what I came up with. That said, this is a good example of how to use NTILE for this type of thing...

    DECLARE...

    "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: creating user databases on ssrs server

    You are describing the thing that SSIS was designed to do. I don't see anything wrong with that provided you are using SSIS according to a set of best security...

    "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: Render XML report using XSL transform

    danka_6786978 (7/24/2013)


    Hi, I am upgrading reports from 2005 to 2008R2 and I noticed that two reports are failing on the new server. So, after looking up its issue, I realized...

    "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 about a Stairway to CLR series

    nick.gekas (4/2/2013)


    Hi,

    I've enjoyed several of the Stairway series to date. I'm just wondering if you could provide one on creating CLR stored procs and UDFs?

    Nick

    +1 Absolutely! I second your suggestion.

    "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: Need TSQL help to monitor the scheduled jobs in SQL 2012

    I'm going to take a quick stab at this since nobody has responded yet. What I am showing you here is not a complete solution but should get you moving...

    "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: why used WITH XMLNAMESPACES in tsql ?

    This is a super-simple, but great overview of XML Namespaces

    http://www.w3schools.com/xml/xml_namespaces.asp

    This article is great for understanding why they exist.

    http://msdn.microsoft.com/en-us/magazine/cc302166.aspx

    The W3C formal definition (if you ever have problems falling asleep)

    http://www.w3.org/TR/REC-xml-names/%5B/url%5D

    Edit:...

    "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,086 through 2,100 (of 2,462 total)