Forum Replies Created

Viewing 15 posts - 5,296 through 5,310 (of 5,502 total)

  • RE: Scalar variable

    Assuming you're running on SS2K5 (since posted in 2K5 forum), you should look into XQuery instead of openxml.

    Example:

    DECLARE @XMLDOC xml

    SET @XMLDOC = N'

    ...



    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: CONVERT & CAST

    Hi Phil,

    Change SELECT

    p.ProductId,

    p.ProductDescription,

    i.LotNumber,

    STR(@Qty,5,2) AS Qty,

    l.LocationId AS DefaultLocation

    FROM GoodsReceipts AS gr

    to

    SELECT

    p.ProductId,

    ...



    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: Dyanamic ORDER BY

    Please don't cross post!

    It won't reduce the time until you get an answer but it might split or double answers.

    Further discussion please on thread http://www.sqlservercentral.com/Forums/FindPost733638.aspx



    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: Cross Joins

    Please provide table structure, sample data and expected result set based on the sample as described in the link in my signature.

    Reason: It looks like you don't need the 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: Iterating through XML node to provide multi column recordset

    Hi Jeff,

    the reason is that you''re trying to get the "sister elements" of csymbol (meaning the elements at the same hierarchy). Instead of querying the csysmbol element you should use...



    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 modify what "FOR XML PATH" returns

    If I understand you correctly your data(=elements) "disappear" from the xml structure if the value is null.

    There are two options I know of how to deal with it:

    1) You can...



    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: Calculate Average Build Cost

    You're welcome!

    Glad it finally worked out for you.

    As you could see: the more easy it is to work on your code the easier (and faster) you'll get an answer.



    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: Calculate Average Build Cost

    You just need to add the ProductID to the SELECT statement as well as the GROUP BY clause:

    SELECT

    DATEPART(YEAR,I.EffectiveDate) AS Production_Year,

    DATENAME(MONTH,I.EffectiveDate) AS Production_Month,

    P.ProductId,

    COUNT (P.ProductId) AS Units_Built,

    AVG(I.MaterialValue) AS AvgMaterialCost,

    AVG(I.LabourValue) AS...



    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: Help - Report Query

    The post hasn't been moved.

    You might have picked the wrong post when you replied. Never mind. I'm going to add a reference from the other post to this one.

    The only...



    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: 'Product level is insufficient Error'

    Hi,

    I typed "Product level is insufficient" into Google search and got the following link as the first hit. It should help.

    http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/289d0bbb-1d06-4856-9c66-8d3e540d7be9



    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: Help - Report Query

    Hi Phil,

    even though we change the thread, the subject is still the same... (for those that might want to look into the "old" story: http://www.sqlservercentral.com/Forums/FindPost732338.aspx

    With one BIG difference: your sample...



    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 add attribute from Parent element to child element's attribute using visual studio designer

    Your example shows the final result after importing the xml structure.

    You don't really need the xsd for that...

    So, the result set does not really have to do with...



    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 retreive the data values from the xml data tree nodes

    Hi,

    just change your line

    RTRIM(NewTable.LOOKUPS.value('Unit[1]','VARCHAR(20)')) As 'Unit',

    to

    RTRIM(NewTable.LOOKUPS.value('../Unit[1]','VARCHAR(20)')) As 'Unit',

    Reason: Your trying to include an element of the previous level. So you have to "climb up" the same way as you...



    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: Calculate Average Build Cost

    Did you actually try your sample script before posting?

    Reason for asking:

    table Inventory:

    column TotalValue is missing.

    column ManufacturingOrder is missing.

    Insert statement fails on table Inventory: trying 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: Calculate Average Build Cost

    Hi Phil/Tommy (?),

    based on your Excel file, what would be the expected result?

    I just used some Excel formulas and I'd assume the following:

    Number of products20

    MaterialValue4098,5205

    LabourValue271,3305

    OverheadValue1731,125

    TotalValue6100,976

    Is this assumption correct?

    Edit: wording modified.



    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,296 through 5,310 (of 5,502 total)