Forum Replies Created

Viewing 15 posts - 5,041 through 5,055 (of 5,502 total)

  • RE: XML to Database Table

    Hi,

    I'd recommend to read through Jacob Sebastians articles "XML Workshop ..." (search for those keywords in this site).

    It covers a lot of subject on how to deal with xml data.

    I...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Query producing unexpected results.

    Hi,

    could you please provide table structure and sample data the same way you just did but for table wce_ilr and wce_contact together with some sample data that show the effect...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Creating column through T-SQL

    I strongly recommend to stay with a relational data model, meaning to have three columns: EMPCODE, Date, value.

    Therewith you don't need any code to add a new column for a...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Bitwise help needed

    Lowell (8/19/2009)


    noone has mentioned the TSQL bitwise operators yet. pipe (|)and carat(^) for flipping bits, and ampersand for comparisons(&)

    The OP mentioned it in the first post:

    JohnG (8/19/2009)


    I know that that...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Query producing unexpected results.

    It looks like it's an issue with your OR condition in your left outer join.

    Check if your suspicious results have rows in wce_contact with the same company name, but none...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Bitwise help needed

    How about the following formula?

    DECLARE @bitPos TINYINT

    SET @bitPos = 4 -- EDIT: was 3

    SELECT @i - ( ( FLOOR(@i/(POWER(2,(@bitPos-1)))) % 2 - @b) * (POWER(2,(@bitPos-1))))

    Some explanation:

    Step 1:

    @bitPos is used to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: what's wrong with this update

    I'm not sure if the logic you're trying to implement will help to achieve the goal you're looking for:

    As far as I can see your EXIST statement is pretty much...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Reading XML file and store it in SQL Server Db

    Hi,

    to begin with a short advise: When posting xml data please use the relevant code tags (a list of IFCode Shortcuts is on the left side of the input box...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to fetch Values in rows from XML column with ntext datatype ?

    the cte (AKA as CommonTableExpression) basically is a subquery / derived table and could also be written as

    SELECT id,

    x.od.value('batch[1]','varchar(10)') AS batch,

    x.od.value('cardexpirationdate[1]','VARCHAR(50)') AS cardexpirationdate,

    y.c.value ('merchantRefCode[1]','VARCHAR(50)') AS merchantRefCode

    FROM (SELECT id, cast (data...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to fetch Values in rows from XML column with ntext datatype ?

    Would something like this meet your requirement?

    ;WITH

    cte AS (

    SELECT id, cast (data AS xml) AS xml FROM #t

    )

    SELECT id,

    x.od.value('batch[1]','varchar(10)') AS batch,

    x.od.value('cardexpirationdate[1]','VARCHAR(50)') AS cardexpirationdate,

    y.c.value ('merchantRefCode[1]','VARCHAR(50)') AS merchantRefCode

    FROM cte

    CROSS APPLY xml.nodes('payment') x(od)

    CROSS...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to Flatten Table Resultset

    cos_ta393 (8/18/2009)


    3) Finally I reviewed Lutz's articles but this solution will be implemented against a 2000 engine

    Thanks,

    Three things to notice:

    a) you posted in a SQL2K5 forum so someone could expect...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Large XML values slow to process

    Let's go for the next turn....

    How about this version?

    It returns all the values from the xml document rather than the selective ones you requested but I decided to leave it...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Large XML values slow to process

    Would something like the following meet your (new) requirement in terms of showing the values (leaving out the ID for the moment)?

    It's not exactly what you've requested but it follows...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Large XML values slow to process

    Now I'm totally lost....

    Why don't you use one or any combination of the tags within the OrderDocumentRequest element, like caseId(2923029), partitionCode (ADK), BatchNumber (3012578260) or tag(TadID)?

    It's really hard to guess...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Large XML values slow to process

    something like SELECT newid() AS ID,

    Breq.value('caseId[1]','varchar(200)') AS [caseID],

    Doc.value('Name[1]', 'varchar(200)') AS [Name],

    Doc.value('Value[1]', 'varchar(max)') AS [Value]

    FROM @xml.nodes('/OrderDocumentBatch/OrderDocumentRequest') AS B(Breq)

    ...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 5,041 through 5,055 (of 5,502 total)