Forum Replies Created

Viewing 15 posts - 4,861 through 4,875 (of 5,502 total)

  • RE: Missed the end of the month

    krypto69 (10/13/2009)


    thanks so much for helping me out...

    No problem. Glad I could help.:-D

    So, you're all set then? (data for September will be returned with the code in my previous post)

    Edit:...



    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: Missed the end of the month

    Date format:

    it depends on the @@language setting during the session you're running the query in.

    By default the Server and each new login is set to US English, so 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: Missed the end of the month

    krypto69 (10/13/2009)


    lutz

    I get an

    An expression of non-boolean type specified in a context where a condition is expected, near ';'.

    change "& lt;" to "<" (the display of SQL code...



    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: Missed the end of the month

    Something along this line?

    WHERE ld.delq_dt < dateadd(mm, datediff(mm, 0, '2009-11-10'), 0)

    The dateadd/datediff will return the first day of the month.

    Edit: code formatting changed to "xml" due to wrong display



    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 to modify

    To post sample data please follow the first link in my signature.

    Another option would be to check BOL for UNPIVOT function ...



    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 do you think about SQLServerCentral.com?

    I'd like to be able to bookmark specific posts/threads (not just articles).

    Another subject would be description handling for a new post:

    It kinda "disappear" once the thread is started. Suggestion: Either...



    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 split list of values in a column into individual values in another column

    Glad we 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: Format data in a select statement In Sql 2005

    Hi Gus,

    to me it looks like a "standard row to col problem"...

    ;with

    cte AS (

    SELECT

    row_number () OVER (partition BY loanref ORDER BY rowid) AS row,

    rowid,

    loanref, notice1

    FROM #test

    )

    SELECT loanref,

    MAX(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: how to split list of values in a column into individual values in another column

    The link Dave pointed you at is a broad overview on how to split a string.

    It actually covers most if not any basic techniques.

    The first link in the "Links for"...



    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: Format data in a select statement In Sql 2005

    Oh, I'm sorry!

    I didn't realize that Notice1, Notice2,and Notice3 are identical in your sample data... My fault. You most probably have valid reasons for adding those columns in 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: SPLITTING CSV COLUMN TO MULTIPLE COLUMNS IN 1 ROW

    You can simply add those addtl cols to the select and group by list.

    You can also use a sub-query, a CTE, an inline table function or a temp table 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: SPLITTING CSV COLUMN TO MULTIPLE COLUMNS IN 1 ROW

    What would be the reason for not using the group by clause?

    Did you try what effect the grouping has on the code below?



    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: Format data in a select statement In Sql 2005

    Unfortunately, you didn't describe the rules for building the groups. 🙁

    First I thought you're looking for min(RowId) per Loanref, but that's obviously not true, because rowid 11 and 12...



    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 me

    kaushikrsharma (10/9/2009)


    1)Please code up a stored procedure that takes a single parameter and allows the calling application to insert multiple records into a single table

    create proc t @val varchar(10)

    as

    insert into...



    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 CSV COLUMN TO MULTIPLE COLUMNS IN 1 ROW

    If you need to keep the values within that row you'd have to do a pivot on the result set you've got when using Jeffs tally Table method.

    Basically, there 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]

Viewing 15 posts - 4,861 through 4,875 (of 5,502 total)