Forum Replies Created

Viewing 15 posts - 6,541 through 6,555 (of 8,753 total)

  • RE: openxml on table with indexed xml column

    N_Muller (11/20/2014)


    As far as I know there are two ways of reading XML using SQL, either openxml or XQuery. There's a lot of debate on which is better or...

  • RE: "Order" between JOIN and APPLY

    ...

    FROM

    Table1 AS a

    CROSS APPLY data.nodes('.../Node1') AS T1(F) -- part 1

    LEFT JOIN Table1 AS b

    CROSS APPLY data.nodes('.../Node2') AS T2(F) -- part 2

    ON b.ID = a.ID

    Quick thought, this doesn't look right...

  • RE: Recursive XML-Xquery

    peacesells (11/20/2014)


    Thanks Eririkur. This certainly gives me a good direction. What if there were multiple secures within a SecurEvent?

    Multiple "Secure/SecureType" elements will multiply the outer/parent "SecureEvent" element, as this is...

  • RE: Are the posted questions getting worse?

    Koen Verbeeck (11/20/2014)


    I have been nominated for the "Author of the Year" award at MSSQLTips.com.

    This means people have to vote for me (or other people, but preferable me):

    http://www.mssqltips.com/MSSQLTipsAuthorVoting.asp

    Note that you...

  • RE: openxml on table with indexed xml column

    N_Muller (11/20/2014)


    I have a table with an indexed XML column. Is it possible to use openxml that takes advantage of the indexes in the table? To my knowledge, openxml only...

  • RE: returning rows within a certain distance in miles from city using longitude and latitude

    Quick thought, if this type of queries are frequent, consider adding a geography column to the tables.

    😎

    Here is a far more efficient way of producing the same results

    USE tempdb;

    GO

    SET NOCOUNT...

  • RE: Are the posted questions getting worse?

    jasona.work (11/19/2014)


    Well, this is shaping up to be an interesting winter here in North America...

    Not even the end of November, and already we've got here in Detroit, Michigan, about 1/2"...

  • RE: Colums to rows

    Quick cross-tab suggestion

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    ;WITH SAMPLE_DATA (ColumnA,ColumnB) AS

    (

    SELECT 1 AS ColumnA,88 AS ColumnB UNION ALL

    SELECT 2, 99 UNION ALL

    ...

  • RE: Recursive XML-Xquery

    Quick solution which uses a recursive CTE, should be enough to get you passed this hurdle

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @TXML XML =

    '<SecureEvent EDate="08/04/2011" ID="47854303" InternalSecureEventID="154472406">

    <SecureEventDate>08/04/2011</SecureEventDate>

    <TimestampCreate>08/04/2011...

  • RE: xml PARSING

    nikki123 (11/18/2014)


    how do i get through the diag codes was working like this but shows null value

    SELECT

    HEADER.DATA.value('@CLM_ID', 'NVARCHAR(max)') AS CODE,

    LINE.DATA.value('@CLM_ID','NVARCHAR(MAX)') AS CLM_IDLine,

    DIAG.DATA.value('@DX_code','NVARCHAR(MAX)') as DX

    FROM ...

  • RE: get colums from queries

    serg-52 (11/18/2014)


    kriskumark96 (11/17/2014)


    Hi,

    The three queries is of the same tables with different where condition are used , so that we cannot have a join or cross join on it

    Or

    Is there...

  • RE: 2K8R2 SSIS Script Component is setting readonly variables?

    Evil Kraig F (11/17/2014)


    Eirikur Eiriksson (11/17/2014)


    The namespace is implicitly created when the variable is declared, no way of telling the difference between user::var and usre::var when you call var.

    Okay, you...

  • RE: get colums from queries

    kriskumark96 (11/17/2014)


    Hi,

    The three queries is of the same tables with different where condition are used , so that we cannot have a join or cross join on it

    There is nothing...

  • RE: 2K8R2 SSIS Script Component is setting readonly variables?

    Evil Kraig F (11/17/2014)


    Yes, I did. Still have the old version. Nothing there, single declaration.

    Ah, that. The chioces are User:: and System::. Why would I wan't to...

  • RE: xml PARSING

    nikki123 (11/17/2014)


    Hi

    Got an other issue how do i get to the node Line , use d a OUTERAPPLY but the data is showing null

    SELECT

    x.item.value('@CLM_ID', 'NVARCHAR(max)') AS CODE,

    g.line.value('@CLM_ID','NVARCHAR(MAX)') as...

Viewing 15 posts - 6,541 through 6,555 (of 8,753 total)