Forum Replies Created

Viewing 15 posts - 6,526 through 6,540 (of 8,755 total)

  • RE: Are the posted questions getting worse?

    SQLRNNR (11/24/2014)


    Jeff Moden (11/24/2014)


    Eirikur Eiriksson (11/24/2014)


    Just a quick question to "the thread", am I missing something or is XML getting more popular? Just noticed that this topic on the XML...

  • RE: Are the posted questions getting worse?

    Jeff Moden (11/24/2014)


    Evil Kraig F (11/24/2014)


    Jeff Moden (11/24/2014)


    Eirikur Eiriksson (11/24/2014)


    Just a quick question to "the thread", am I missing something or is XML getting more popular? Just noticed that this...

  • RE: Are the posted questions getting worse?

    Jeff Moden (11/24/2014)


    Eirikur Eiriksson (11/24/2014)


    Just a quick question to "the thread", am I missing something or is XML getting more popular? Just noticed that this topic on the XML forum...

  • RE: Are the posted questions getting worse?

    Just a quick question to "the thread", am I missing something or is XML getting more popular? Just noticed that this topic on the XML forum has proportionally many times...

  • RE: Importing XML into Multiple Tables

    Quick questions, can you post an example of the XML and how big are the files?

    😎

  • RE: Flat file read , conditionally extract data rows

    Quick suggestion as this isn't as complex as it seems at first, import the file's content into a staging table, one line per row and group/parse it from there.

    😎

    USE tempdb;

    GO

    SET...

  • RE: Question about VALUE

    Quick note (for completeness), the inner query returns an XML, the value() method is invoked on that XML

    😎

    (inner query returning XML).value() <--the value method on the XML data type.

  • RE: rollback transaction in nested stored proc

    gravitysucks (11/24/2014)


    create proc proc1 (@param1 int)

    as

    begin try

    declare @param2 int

    begin transaction

    exec proc2 @param2

    commit transaction

    end try

    begin catch

    if @@trancount > 0

    rollback transaction

    end catch

    i haven't had an opportunity to do this before....

  • RE: XQuery insert new node

    Good catch with the node value Arthur, don't think it merits a dynamic sql though as one can easily encode the value with a simple FOR XML statement.

    😎

    /* Simple encoding...

  • RE: XQuery insert new node

    As I mentioned before, often the XML must be interrogated to determine the placement of the inserted node. This sample checks both the XML to be modified and the XML...

  • RE: XQuery insert new node

    The XML modify/insert has 4 positioning directives, as first,as last, after and before, changing from as last to after for the correct positioning, note the slight difference in the syntax.

    Often...

  • RE: XQuery insert new node

    Edit: deleted the post

  • RE: XQuery insert new node

    Quick'n simple example

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    DECLARE @TXML XML = '<Attribute>

    <A1>6529</A1>

    <A2>6529</A2>

    </Attribute>';

    DECLARE @NNODE VARCHAR(100) = 'A3';

    DECLARE @NVAL VARCHAR(100) = 'New value';

    DECLARE @Nt ...

  • RE: cursor replace hyperlink function

    Quick solution of the "first coffee in the morning" kind, probably not the most efficient but it works

    😎

    USE tempdb;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID('dbo.database_tags') IS NOT NULL DROP TABLE dbo.database_tags;

    create table...

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

    KoldCoffee (11/20/2014)


    eirikur, the query you provided is good. Not sure it performs faster in myenvironment tho. Once query execution plan is cached it's about same, but it is still better...

Viewing 15 posts - 6,526 through 6,540 (of 8,755 total)