Forum Replies Created

Viewing 15 posts - 3,016 through 3,030 (of 5,504 total)

  • RE: problem reading a xml field: xmlns causing null result

    rscavilla (8/11/2010)


    Thank you Lutz, I did add the namespaces and it returned the correct values;

    ;with xmlnamespaces(default 'urn:hl7-org:v3')

    select Labelid,

    LabelXml.value('(/document/title)[1]', 'varchar(50)') AS 'Title',

    LabelXml.value('(/document/effectiveTime)[1]/@value', 'varchar(50)') as effectiveTime

    My issue now is unfamiliarity with the...

  • RE: Performance Tuning 40,000,000

    Please provide all table defs including all indexes on those tables as well as the actual execution plan for the query. You've been around long enough to know how to...

  • RE: problem reading a xml field: xmlns causing null result

    please provide the sample xml data in total, not only the first line.

    You'll need to use WITH XMLNAMESPACES() together with your select statement, and maybe you'd need to add the...

  • RE: Can I use pivot on this query?

    Glad I could help 😀

    Would you mind sharing the performance difference for the solution you used before vs. the one I provided? Just being curious...

  • RE: Help needed to generate an XML Structured output file

    Please provide table def and sample data so we have something to test against.

    Also, please show us what you've tried so far.

  • RE: Increment 1 min when matching start and end time

    ColdCoffee (8/10/2010)


    LutzM (8/10/2010)


    @ColdCoffee:

    Sorry for sending you in the wrong direction!

    Not at all, Lutz. I already coded the sample data with IDENTITY column , so that i will get a ROW...

  • RE: Sorting with multiple columns using CASE

    With your current design it's close to impossible (unless you're going to use some delimited strings): you have two variables (@SortBy and @SortDirection) and you want to have more than...

  • RE: Updating 2 rows in table B based on 1 row from table A

    Even though I have no idea what value you want to store in the DescriptionID column nor do I have a clue as how you'd calculate the number to be...

  • RE: Are the posted questions getting worse?

    GilaMonster (8/10/2010)


    ...Love to, but it wouldn't be allowed through customs on this side. Same with honey, fruit and meat products etc. Otherwise I'd bring biltong when I visit (as...

  • RE: Increment 1 min when matching start and end time

    Drew,

    I guess the Row_Number approach I was hitting for was overdesigned for the task...

    You're absolutely right, for the given task a simple join on the time columns would be enough.

    That's...

  • RE: Increment 1 min when matching start and end time

    You would need to use ROW_NUMBER() to put your data in sequence and do a self join on this subquery (or better, CTE) based on the row number column with...

  • RE: Can I use pivot on this query?

    I would use CrossTab over PIVOT due to more flexibility:

    ;

    WITH cte AS

    (

    SELECT

    RP.PERIODNAME,

    [1.1] = COUNT(CASE WHEN C.CASETYPE = 'F' AND C.PROPERTYTYPE = 'P' AND RIGHT(C.IRN, 2) = 'PA' AND CE.EVENTNO =...

  • RE: Creating Pivot table

    PIVOT isn't really that great of a tool if you either have to pivot by more than one column or if your target columns aren't fixed.

    You should have a look...

  • RE: Are the posted questions getting worse?

    bitbucket-25253 (8/9/2010)


    ... teaching him you catch more flies with honey than vinegar?

    :-D;-):-D

    I don't think that's actually true: That's how we get rid of fruit flies:

    1/2 shot glass cider vinegar,

    1/2 shot...

  • RE: how generate series?

    Please have a look at the TallyTable article referenced in my signature.

    Once you have such a table it's as easy as

    SELECT @start + N

    FROM Tally

    WHERE N <= (@end - @start)

    (You...

Viewing 15 posts - 3,016 through 3,030 (of 5,504 total)