Forum Replies Created

Viewing 15 posts - 3,826 through 3,840 (of 5,502 total)

  • RE: query help - is there a good solution to this?

    Please provide table definition, sample data and expected result in a ready to use format as described in the first link in my signature.

    That would make it easier for us...



    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: Overlapping Date Ranges with Gaps Possible

    I would use a calendar table (holding the day values), expand it to cover 24hrs per day (or the possible working hours) and join that to the ShiftData table.

    Something 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: Help with XML

    Please provide table def and sample data that correspond to your expected result in a ready to use format as described in the first link in my signature.



    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: Importing XML data contained in a table's column to another table

    Glad I could help! 😀



    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: Collation Conflict

    I'm not sure if it helps but you could try to enforce a specific collation within the CASE statement:

    SELECT

    CASE

    ...



    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: Splitting a single row into 2

    Please provide some more information.

    What would be great would be some sort of ready to use sample data as described in the first link in my signature.

    In your case 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: IN function

    You would need to use dynamic SQL for that:

    Here's an example:

    DECLARE

    @list VARCHAR(30),

    @SQLString NVARCHAR(200)

    SET @list ='''Bothell'',''Portland'''

    SET @SQLString = N'SELECT * FROM Person.Address WHERE city in('+@list+')'

    EXEC sp_executesql @SQLString



    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: Are the posted questions getting worse?

    I just have a headline for SSC jumping into my mind:

    Having trouble with your database or your kids?

    Have a look at SSC! We'll tune both! 😀 :hehe: 😀



    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: Are the posted questions getting worse?

    CirquedeSQLeil (4/7/2010)


    ...

    Funny - exercising restraint to not use a 1-liner on that.

    Brave man. Do you want us to consider it some kind of self-flagellation? 😀



    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: Are the posted questions getting worse?

    Grant Fritchey (4/7/2010)


    You kids take this outside or I'm going to get my belt!

    If there's any masochist involved you just called to continue :w00t:

    Side note:

    @jason: no matter how long your...



    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: Have some question

    GregoryF (4/7/2010)


    I think you have gone way beyond the scope of someone who asked what the difference between delete and truncate is 🙂 Don't confuse them while they 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: delete repeating rows

    You might want to look into ROW_NUMBER together with CTEs. There are several solutions available on this site. Please search for "duplicate rows" in the scripts section.



    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: Recursive cross join to get all available combinaisons

    Do you know the max number of cross joins ahead of time?

    What I'd probably do in this case is to build a static table like the one I posted covering...



    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: Have some question

    Steve Jones - Editor (4/7/2010)


    ... But asking how many types of temp tables exist implies....

    Steve, would you consider a worktable as being the third type of a temp table? 😉

    From...



    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: Two job offers..two different companies

    WayneS (4/7/2010)


    Some places use a 6 month contract to "try you out". If you do a good job, they'll turn it into a FT job. If not, bye bye. 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]

Viewing 15 posts - 3,826 through 3,840 (of 5,502 total)