Forum Replies Created

Viewing 15 posts - 1,996 through 2,010 (of 2,462 total)

  • RE: How to extract a column value from data stored in XML column.

    arthurolcot (12/23/2013)


    You can extract specific nodes by use the xml values() method. Additionally, because the data that you have is using a namespace, you also in this instance need to...

    "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 XML Value

    bryan 83518 (1/15/2014)


    Trying to work out how to query xml that looks like this I will loop through all the artist but only want the Main Artist not the Secondary

    <Artists>

    <ArtistText>Genie...

    "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 XML Value

    Richard Fryar (1/15/2014)


    Rewritten to get the xml from a variable, but you should be able to apply this logic to your situation:

    declare @x xml

    select @x = '

    <Artists>

    <ArtistText>Genie Zhuo</ArtistText>

    <Artist Type="Main">

    <FullName>Genie Zhuo</FullName>

    </Artist>

    <Artist...

    "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: passing a variable to CTE in a view

    ...but just came to know that our application/framework does not support procedures of functions

    Just a thought...

    This might not help with the hierarchy situation but may help you get around your...

    "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: Options for storing .jpg files on SQL Server 2008 R2

    ELLEN-610393 (1/21/2014)


    Gentlemen, much thanks to all of you.

    I will read up on the FILESTREAM / and storing BLOBS outside of the database.

    Will also test using varbinary(max) .

    The images should not...

    "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: passing a variable to CTE in a view

    Prassad Dabbada V R (1/21/2014)


    you cannot pass parameters to View

    For parameterized views please check below link

    http://msdn.microsoft.com/en-us/library/c11kd98s(v=vs.80).aspx

    You can also think of an inline Table Valued Function (iTVF) as a parameterized view....

    "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 help to Add XML encode using T-SQL

    Hopefully you understand what Evil Craig was saying. To put it another way: you cannot click on the XML returned from a SQL query in SSMS and see a header...

    "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: Mastering Dimensions of Time

    Nice work on the article.

    I was putting together a way to populate dimdate using a tally table but see that Louis beat me to it. Thought I would include...

    "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: Parameter sniffing Troubles

    Grant Fritchey (1/13/2014)


    Alan.B (1/13/2014)


    I took a quick look at this and there does appear to be a lot parameter sniffing but there's a lot of other problems too.

    I'm confused....

    "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 NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008

    I will ignore your comment about suggesting that always using NOLOCK is a good idea when integrity of the results is not important.:w00t:

    To be clear (and to avoid being 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: Parameter sniffing Troubles

    First is that the query plan from SSMS (the faster version)? Is it possible to provide both?

    I took a quick look at this and there does appear to 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: DIFFERENCE BETWEEN NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008

    kbhanu15 (1/9/2014)


    Hi All,

    can any one clarify the difference between NOLOCK and WITH(NOLOCK) in sql server 2008 ?

    which one is the best practice to use ?

    Thanks

    Bhanu

    I think everyone did a good...

    "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: xml to html

    I know this is a few days old but I thought it would be good to expand on this a little:

    The W3C defines two technologies for "Transforming XML": SQLXML/XQuery...

    "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: insert (xml dml) error

    Unless I am mistaken it appears that you cannot add CDATA to the XML data type. This is a known Microsoft bug which they doesn't look like it's getting fixed....

    "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 giving unexpected results

    Do you have any DDL/Sample data for [alpsMaster].[dbo].[uExtractMonitor]? ... and some sample data for what will go into files? If you can provide that I am sure we can help...

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