Forum Replies Created

Viewing 15 posts - 31 through 45 (of 388 total)

  • RE: Fetching data from xml Column in correct way

    'Record/Body/Insert/Request/Column[1]/UpdateInfo/text()' will give you the first occurence of UpdateInfo (Column[1])

    'Record/Body/Insert/Request/Column/UpdateInfo' will give you all results in a fragment.

    <UpdateInfo>TESTPOLICY01</UpdateInfo><UpdateInfo>test Policy 01 for Appraisal</UpdateInfo><UpdateInfo>1</UpdateInfo><UpdateInfo>30</UpdateInfo><UpdateInfo>TOPICA</UpdateInfo><UpdateInfo>Topic A bind with objective</UpdateInfo><UpdateInfo>1</UpdateInfo><UpdateInfo>dd</UpdateInfo><UpdateInfo>01</UpdateInfo><UpdateInfo>Test</UpdateInfo><UpdateInfo>01-Jan-1900</UpdateInfo><UpdateInfo>0</UpdateInfo><UpdateInfo>32</UpdateInfo><UpdateInfo>we</UpdateInfo><UpdateInfo>we</UpdateInfo><UpdateInfo>60</UpdateInfo><UpdateInfo>30</UpdateInfo><UpdateInfo>6/11/2014 12:00:00 AM</UpdateInfo><UpdateInfo>30</UpdateInfo><UpdateInfo>6/11/2014 12:00:00...

  • RE: Rename the duplicate entries.

    This may help.

    ;WITH mytable AS

    (SELECT * FROM (

    VALUES('Test1'),('Test1'),('Test2'),('Test2'),('Test3'),('Test4')

    )x(y))

    , plusrownum AS

    (SELECT row_number() OVER (PARTITION BY y ORDER BY y) AS rownum,y FROM mytable)

    SELECT y + CASE WHEN plusrownum.rownum<>1 THEN...

  • RE: Fetching data from xml Column in correct way

    If you provide a block of compliant xml i.e. tags which open and close then perhaps I can help...but not as it is. (Maybe someone else is more charitable...

  • RE: Fetching data from xml Column in correct way

    check your xml....the xml supplied is not valid.

  • RE: Real World T-SQL Tricks

    As for TRY...CONVERT, Steve's obviously thinking back to his rugby playing days!

    Ireland / Australia tomorrow btw....come on Ireland!! 😛

  • RE: Using Comments to Quickly Test CTEs

    i like this a lot 🙂

    Thanks for sharing.

  • RE: Practical Uses for Synonyms in SQL Server

    As a wierd coincidence, I'm giving a demo today on synonyms to my team, as they're going to have to start using them.

    I use them for every access external...

  • RE: Exploring Recursive CTEs by Example

    Jeff Moden (7/25/2014)


    David McKinney (7/17/2012)


    I love it! Especially the conclusion.

    It's time we stopped being afraid to whisper the words 'Recursive CTE' for fear of being heard by...

  • RE: Regroupement sur interval de date

    i got to a similar state of incompleteness. I thought I could apply a ranking function at this stage to get me to the next step, but i can't...

  • RE: IT and the Older Generation

    Good thought-provoking editorial, unfortunately let down by several spelling mistakes.

    Sorry, I'm very pedantic, I know, but it spoils my reading pleasure and shouldn't happen in an 'editorial'.

  • RE: Farewell

    We'll wait for you, man.

    😎

  • RE: Script to Generate Table to Stored Procedure Cross References

    chr(32) (space) isn't the only terminator... you can have brackets, return chars, semi-colons etc..

    I submitted a script not dissimilar to yours, which also considers these characters.

    http://www.sqlservercentral.com/scripts/SQL+Server+7/65162/

    Regards,

    David.

  • RE: Using EXCEPT to Determine Row Differences

    you can use UNION also to do something similar. In this case, it returns both rows when there's a difference.

    SELECT*

    FROM(SELECT*

    ,count(1) OVER (PARTITION BY ID) AS versions

    FROM(SELECT*

    FROM#Source...

  • RE: Using EXCEPT to Determine Row Differences

    the join is to restrict the comparison to those cases where you have the same key values present in both source and value - and are looking for differences (rather...

  • RE: how to use One CTE value in another CTE ,in SQL 2008 R2

    ;

    With CTE1 AS

    (

    Select count(Column1) as Cnt_Column1_Tbl1 FROM TABLE1 with some CONDITION1

    ),

    CTE2 AS

    (

    Select count(Column2) as Cnt_Column2_Tbl1 from TABLE1 with some conditions2

    )

    Select ( CTE1.Cnt_Column1_Tbl1 - CTE2.Cnt_Column2_Tbl1) FROM CTE1, CTE2

    given that apparently CTE1...

Viewing 15 posts - 31 through 45 (of 388 total)