Forum Replies Created

Viewing 15 posts - 616 through 630 (of 5,502 total)

  • RE: Getting Most Recent Date

    Your query should return only one row per AP_Ex.Student_ID only when all other values except AP_Ex.Ap_Expt_Date are equal.

    Check the column values per AP_Ex.Student_ID. At least one more column will show...



    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: SELECT statement issue, spread by YYYYMM

    Here's a solution using a on-the-fly calendar table and the CrossTab method.

    If you need this solution as a "sliding window" I still recommend to use the CrossTab article referenced in...



    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: Backup & Restore Oracle DB!

    You might want to ask this in an Oracle forum.

    This is mainly a MS SQL Server site.

    IIRC, http://asktom.oracle.com is a good resource.



    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: CTE Help : At my wits end

    Joe, can you please clarify how the check constraint

    CHECK (week_date LIKE '[12][0-9][0-9][0-9]-W[0-5][0-9]-[1-7]'),

    would ever work on the data type specified (week_date CHAR(1)) ?

    I expect that's just a typo and is...



    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: SELECT statement issue, spread by YYYYMM

    J Livingston SQL (2/12/2012)


    ...

    "catch a man a fish and you can sell it to him"

    "teach a man to fish and you have lost a business opportunity"

    ROFL!!

    That's just great!

    Just another example...



    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: SELECT statement issue, spread by YYYYMM

    Digs (2/11/2012)


    Sir, I am an old fart working on a private project...just needed a little help !

    Thanks 🙂

    "A little help" in the meaning of "Give me some fish" or "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: CTE Help : At my wits end

    Are you looking for something along those lines?

    ;

    WITH cte AS

    (

    SELECT

    wd.*,

    ww.WrkWk_Duration,

    ROW_NUMBER() OVER(PARTITION BY WrkWk_Key ORDER BY WrkWkDtl_Business_Date ) row

    FROM WorkWeek_Details wd

    INNER JOIN WorkWeek ww ON wd.WrkWkDtl_Key=ww.WrkWk_Key

    )

    SELECT

    *,

    CASE

    WHEN (WrkWk_Duration...



    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: SELECT statement issue, spread by YYYYMM

    Digs (2/11/2012)


    Thanks, but that stuff hurts my head...:w00t:

    Any one else wishing help out much appreciated...

    Hmmm....

    Let's assume you'll get a coded version. How will you actually use it?

    Would you just put...



    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: SELECT statement issue, spread by YYYYMM

    To get all the month in the time range you need a calendar table (either a permanent or on-the-fly).

    For the Pivot I'd use the DynamicCrossTab approach as described in 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: Totaling 1 row's #'s from a distinct related row

    pharmboy4u (2/11/2012)


    Hello,

    Sorry I'm not posting in a table form, I don't create them so I'm not fluent in the lingo and it would take me forever (I am a SQL...



    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 Records - reg

    Is the WHERE clause only based on the identity column only?

    What does the WHERE clause look 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: Regarding store procedure

    Why do you want to write it differently?

    The way it is right now is one valid approach to tackle "catch-all-queries"[/url].

    It might be an option to move the "common query" 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: ADDING VALUES IN MULTIPLE TABLE WITH THE SAME COLUMS AND ROWS

    Would the UNION approach help?

    WITH cte AS

    (

    SELECT AU, GL ,GL1, [MONTH], PERIOD

    FROM VELLS

    UNION ALL

    SELECT AU, GL ,GL1, [MONTH], PERIOD

    FROM VELLS2

    UNION ALL

    SELECT AU, GL ,GL1, [MONTH], PERIOD

    FROM VELLS3

    )

    SELECT AU, SUM(GL) 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: Securing data from internal theft

    shahgols (2/10/2012)


    You got great points Rob, thanks for that!

    And thanks for your response Burninator. Are you guys allowed to use USB or connect your cell phones to your PCs?

    USB...



    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: Grouping on CASE statements = slow query?

    Here's a slightly different approach using a in-line table-valued function (itvf).

    I don't know if it will even compile since I have nothing to test against (your sample data require a...



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