Forum Replies Created

Viewing 15 posts - 4,261 through 4,275 (of 5,502 total)

  • RE: Pass Node of XML as parameter in XQuery

    If your question has not been answered yet by either Barry or Matt then it would really help if you could provide a short sample of what you're 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: Transpose cloumns into rows and rows into columns

    I'm not aware of any transpose function in SQL Server.

    So you'd need to UNPIVOT your data to get three columns (state, month and value). Then use one of the links...



    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: ASC and DESC in dynamic ORDER BY clause

    Magy (2/15/2010)


    I'm not sure if this would work...does this use ASC or DESC?

    Thanks!

    Yes and no.

    No, since you won't find the keywords.

    But yes, since this code's using a little...



    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 do I pass a value in a field to the next row where the field is null in one or more in the following rows

    @ Jeff: at a second thought I kinda disagree with your clustered index...

    Shouldn't it be on (EmployeeID, SalaryDate) instead of RowID?

    What would happen with rows like:

    SELECT 1, 12, '20050101', 50000...



    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 do I pass a value in a field to the next row where the field is null in one or more in the following rows

    @andrew:

    If you consider using Jeffs solution (which performs much better than mine) I think it's mandatory to read the Running Total / quirky update article[/url] including the discussion.

    I think...



    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 do I pass a value in a field to the next row where the field is null in one or more in the following rows

    There's no reason to apologize, Ron!!

    If there's anybody that made a mistake than it will be me, since I didn't describe the usage of my script well enough so 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: How do I pass a value in a field to the next row where the field is null in one or more in the following rows

    @bitbucket:

    My code snippet has the following lines at then end:

    --UPDATE #SalaryHistory SET #SalaryHistory.salaryamount = cte3.salaryamount

    SELECT cte3.*

    FROM cte3 INNER JOIN #SalaryHistory ON cte3.rowid=#SalaryHistory.rowid

    The UPDATE and the SELECT part are alternatives. The...



    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: Caching a table

    @jason:

    Wouldn't SQL Server decide on his own whether a temp table is required or not - even without defining global temp tables?

    I, personally, try to avoid ##tables, since it cannot...



    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 do I pass a value in a field to the next row where the field is null in one or more in the following rows

    I'm pretty sure there will be a more elegant solution posted shortly but meanwhile here's what I came up with:

    (Note: once you reviewed the result, change the SELECT line 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: Insert value using XML

    Store the results of the following query into a temp and use that table for your inserts.

    The [data] column holds the data for your second table in xml format....



    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: Dynamic Query generation

    Easy stuff first: In order to benefit from the LIKE statement you'd need to change like 'Dav' to like 'Dav%'.

    How do you know if you have to use AND or...



    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: Restructuring of the database

    I'm a little confused...

    If you decide to create a new database you'd need to have a good understanding of the business rules as well as the data model and structure.

    Once...



    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: Insert value using XML

    I'd recommend storing the data in an intermediate table and select from there.

    Side note: I don't think it's necessary to quote the complete script for every reply...



    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: Insert value using XML

    How to generate tid? tid is a running no with prefix t000000000x

    It depends. You could use ROW_NUMBER and a temp table or, if you need to get the ID based...



    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: Addition of row in Excel sheet(using SSIS)

    Copied straight from this post:

    SSIS samples rows in Excel. It looks like it examines the first 8 rows.

    Search for this phrase to learn more. 'ssis typeguessrows excel'



    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 - 4,261 through 4,275 (of 5,502 total)