Forum Replies Created

Viewing 15 posts - 2,611 through 2,625 (of 8,753 total)

  • RE: Converting XML file to SQL table

    Jay B (11/26/2016)


    Great!!!

    many many thanks

    You are very welcome.

    😎

    Just a quick note, do use the text() function when extracting element values, it is much more efficient than extracting the values without...

  • RE: Converting XML file to SQL table

    Here is a quick example, should be enough to get you over this hurdle.

    😎

    USE TEEST;

    GO

    SET NOCOUNT ON;

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

    CREATE TABLE dbo.XMLwithOpenXML

    (

    Id...

  • RE: Time for a consultant

    I have unraveled such situations quite few times, always some nice surprises;-)

    😎

    Two questions, what is the isolation level used? What is the ratio of optimization time outs?

  • RE: How to prevent having XMLNS added to each and every record?

    Can you post an example of the XML please?

    😎

  • RE: How to prevent having XMLNS added to each and every record?

    BOR15K (11/25/2016)


    Not sure I understood you - it will show xmlns='*' then, no?

    Not what I meant

    😎

    To clarify, skip this

    WITH XMLNAMESPACES (

    'urn:digi-inkoop:ubl:2.0:NL:1.6:UBL-NL-CommonBasicComponents-2' AS [nl-cbc],

    'urn:un:unece:uncefact:data:draft:UnqualifiedDataTypesSchemaModule:2' AS udt,

    'urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2' AS ext,

    'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2' AS cbc,

    'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'...

  • RE: How to prevent having XMLNS added to each and every record?

    Quick suggestion, skip the namespaces and use a wildcard *: prefix instead.

    😎

  • RE: how to return multiple values in the where clause using case statement

    Nomvula (11/25/2016)


    Yes, I want to be able to enter multiple values for the @shift.

    @shift is a scalar variable, you are probably better of splitting the content or do some other...

  • RE: how to return multiple values in the where clause using case statement

    Nomvula (11/25/2016)


    Thanks for the response, but I tried that solution it's only works if you select single value. I you select multiple selection the WHERE clause doesn't work.

    Regards,

    Do you want...

  • RE: Clustered Index on datetimeoffset?

    I would think very carefully about this before implementing

    😎

    1) Will there be more indices on the table than the clustered index?

    2) Will the clustered index key be foreign key in...

  • RE: how to return multiple values in the where clause using case statement

    Here is a suggestion

    😎

    DECLARE @shift VARCHAR(100) = 'Afternoon Shift (FMF/SVP)';

    DECLARE @Table TABLE

    (

    code VARCHAR(10)

    ,Description VARCHAR(100)

    ...

  • RE: XML Query treating alias as DB

    He he, didn't read the post properly:w00t:

    😎

    Can you post an example of the XML stored in the @RichTests variable?

  • RE: XML Query treating alias as DB

    richard.wanamaker (11/24/2016)


    Running this:

    INSERT INTO [dbo].RichTest

    SELECT doc.col.value('(.)[1]', 'nvarchar(50)')

    FROM @RichTests.nodes('/macs/mac') AS doc(col)

    WHERE NOT EXISTS (SELECT 1 FROM [RichTest] WHERE [Name] = doc.col.value('(.)[1]', 'nvarchar(50)')

    Getting this:

    System.Data.SqlClient.SqlException: Database 'Doc' cannot be opened because...

  • RE: Are the posted questions getting worse?

    Gazareth (11/24/2016)


    Eirikur Eiriksson (11/24/2016)


    Gazareth (11/24/2016)


    BWFC (11/24/2016)


    ThomasRushton (11/24/2016)


    BLOB EATER (11/24/2016)


    GilaMonster (11/24/2016)


    Brandie Tarvin (11/24/2016)


    Much prefer chocolate or herbal tea (decaf).

    The office kitchen also caters to stranger tastes, with 3 types of tea...

  • RE: What is Normal?

    RonKyle (11/23/2016)


    What is you natural key for "person" records?

    In most cases there isn't one. I would certainly never use an SSN for this. But that doesn't mean that...

  • Viewing 15 posts - 2,611 through 2,625 (of 8,753 total)