Forum Replies Created

Viewing 15 posts - 2,701 through 2,715 (of 5,502 total)

  • RE: Unpivot

    Please decide by yourself which option is easier to read....

    DECLARE @tbl TABLE

    (

    id INT, name VARCHAR(30)

    )

    INSERT INTO @tbl SELECT 1 ,'x'

    -- option a

    SELECT 'id' AS col1,CAST(id 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: Unpivot

    duplicate post.

    please continue at http://www.sqlservercentral.com/Forums/FindPost1006219.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: How to return last 10 rows of a table?

    Please any book on RDBMS.

    What is the message you're trying to bring across with that statement? Sounds incomplete...

    Tables have no order.

    The question was not about the order...



    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 is Best Way to calculate presence time....

    Unfortunately, it seems like you didn't read the article yet.

    I tried to import the xls data you provided but the time columns will remain empty even if it seems like...



    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 is Best Way to calculate presence time....

    ashkan siroos (10/17/2010)


    Dear Lutz,

    I didn't mean that , and i know you help me and all people because of your kindness.

    I will attache those immediately, and if i said...



    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 is Best Way to calculate presence time....

    Ashkan,

    did you read the article I pointed you at?

    The purpose of posting table def and sample data in a ready to use format is to help us help you.

    We are...



    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: jobs

    It depends.

    Sounds like an interview question (at least in combination with your other question at the very same time)



    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: long running queries

    It depends.

    Sounds like an interview question (at least in combination with your other question at the very same time)



    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: combine 2 pivot table

    elham_azizi_62 (10/17/2010)


    hi all.

    how to combine 2 pivot table in 1 view?

    It depends.

    Sounds like an interview question (at least in combination with your other question at the very same time)



    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 is Best Way to calculate presence time....

    I don't think there is a c.u.r.s.o.r *cough* needed...

    But in order to show a set based solution I'd like to see table def for cardtime.dbo.inout and cardtime.dbo.WatchBuilding including some 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: Help with SQL Query

    Sounds like a homework question.

    If you use the answer from above without quoting the source (therewith stating it's not your solution) it'll be considered as plagiarism. It's cheating anyway.

    Another story...



    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: Detective Stories - Changing the Case

    How about this?

    ;WITH cte AS

    -- split each string by character and decide UPPER or lower based on previous character or being the first char

    (

    SELECT

    N,

    Id,

    CASE

    WHEN N=1...



    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: delete running slow

    Ninja's_RGR'us (10/16/2010)


    ...

    How long are they required to keep it around?

    Due to the table and column names I'd guess we're talking about a database that needs to be compliant 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: Delete record without using Delete keyword

    jaffrey (10/16/2010)


    Of course, there will be slightly more effort if foreign keys, constraints, triggers and the like will be involved....

    So far the query works fine as long as the constraints,triggers,procedures...



    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: Compound interest query

    I would use the "quirky update" method.

    Disclaimer:

    DO NOT USE the code

    until you've read Jeff's article[/url] and the related discussion.

    DO NOT USE the code

    until 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]

Viewing 15 posts - 2,701 through 2,715 (of 5,502 total)