Forum Replies Created

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

  • RE: Getting Most Recent Date

    Edit: no longer relevant 😀

  • RE: Getting Most Recent Date

    masonvann (2/13/2012)


    Thanks, Lutz. I think I understand - One result set per Student_ID as long as the other rows match in every column except AP_Ex.Ap_Expt_Date. If you don't mind another...

  • 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...

  • 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...

  • 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.

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • RE: Delete Records - reg

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

    What does the WHERE clause look like?

  • 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...

  • 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...

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