Forum Replies Created

Viewing 15 posts - 4,141 through 4,155 (of 5,502 total)

  • RE: which query's exec. costs are better/more efficient

    Here's my interpretation of the numbers:

    Query 1:

    There really seems to be no big difference. Run it with a larger data set to see which query scales better. You could also...

  • RE: Loading XML into SQL via XML Loader Tool

    Do you know the structure of your XML file?

    If so, can you post some sample data to describe the structure?

  • RE: XML Parse Query

    RBarryYoung (2/28/2010)


    ...

    What I did notice though is that adding the text function ("(.../text())[1]") really seems to help the optimizer to produce a much more efficient XML query (I actually learned...

  • RE: XML Parse Query

    Paul White (2/28/2010)


    lmu92 (2/28/2010)


    ...

    Really? I did run both last night, and both took zero milliseconds :doze:

    Are you comparing estimated costs?

    You're right in terms of execution time. But when...

  • RE: XML Parse Query

    Paul White (2/27/2010)


    ...

    In the real world, I'd probably use your one, though there's not much to choose between the first two, so it's possibly just a question of style.

    ...

    Paul

    I compared...

  • RE: Using CTE Common table expressions with SELECT CASE statement

    A similar approach to Pauls VIEW concept, but a different way to query the results:

    You could insert the result set of your CTE (which would become a normal SELECT statement)...

  • RE: need help in sql

    tabrez.test (2/27/2010)


    also ihave tried above sql they are also displaying policies which have trans add and trans can and in between other trans like ren,adj,,,(which should not )

    i want...

  • RE: Transform Data -- Sequential to 3 Groups of Columns

    PhilM99 (2/27/2010)


    Yes, that was an error I made during construction of the sample for posting. Sorry!

    But it led to a useful learning exercise!

    Phil

    Great you look at it that way!!

    And nothing...

  • RE: Transform Data -- Sequential to 3 Groups of Columns

    PhilM99 (2/27/2010)


    I was preparing some data to demonstrate the conversion error when I discovered the problem, which was not with the MAX statement, but with the CASE statement in the...

  • RE: Transform Data -- Sequential to 3 Groups of Columns

    I haven't seen a scenario where the MAX() function on character values did not work.

    Would you mind posting some of the data that will fail in your scenario?

    Based on the...

  • RE: need help in sql

    bitbucket-25253 (2/27/2010)


    Din not see lmu92's solution before posting mine .. lmu sorry about that ...

    Nothing to be sorry for!

    If it's any different than mine you should keep it posted. Two...

  • RE: Using CTE Common table expressions with SELECT CASE statement

    If number of columns and data type would be identical for table 1 and table2 I guess Pauls approach would be the way to go.

    But that doesn't seem to be...

  • RE: need help in sql

    I would use a self join on a numbered CTE.

    I don't know how you determine the row that's "immediate next" so I assumed a id column. The reason why I...

  • RE: Transform Data -- Sequential to 3 Groups of Columns

    It's kind of a PIVOT but this scenario is also sometimes referred to as CrossTab.

    To get the individual numbers grouped together it's better to use the PARTITON BY clause of...

  • RE: SQL Query Question

    lmu92 (2/27/2010)


    There seems to be something wrong in your sample data:

    table dbo.TempUserTags has three entries for TagId=1 (C Sharp). (ID 1,7, and 17)

    Why do you expect C Sharp existence in...

Viewing 15 posts - 4,141 through 4,155 (of 5,502 total)