Forum Replies Created

Viewing 15 posts - 661 through 675 (of 3,544 total)

  • RE: Are the posted questions getting worse?

    SQLRNNR (6/30/2014)


    David gave him most of the answer already but he didn't try to do anything with it other than say it doesn't work.

    Actually Lynn's solution looked like my first...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need help on SQL Query

    At what level are you sequencing STORE2 and STORE, ItemID , ItemProgramPricingID or combination of columns?

    How will UNI and UNI2 fit in this processing?

    *Edited*

    p.s. Please post your expected results for...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need help on SQL Query

    SQLRNNR (6/27/2014)


    Is this good enough to save the OP from getting fired?

    :ermm: Hope the job does not ride on this solution alone :pinch:

    Just something I pieced together from what...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need help on SQL Query

    Third time lucky 🙂

    WITH cte (itemID,ItemProgramPricingID,Price,Quantity,Points,ProgramCodeName,RowID)

    AS (

    SELECTipp.itemID,

    ippv.ItemProgramPricingID,

    ippv.Price,

    ippv.Quantity,

    ippv.Points,

    p.Code,

    ROW_NUMBER() OVER (

    PARTITION BY ipp.itemID,ippv.ItemProgramPricingID,ippv.Price,ippv.Quantity,ippv.Points

    ORDER BY CASE WHEN p.Code = 'STORE2' THEN 1 ELSE 2 END ASC)

    FROMItemProgramPricing ipp

    JOIN ItemProgramPricingValues as ippv on ippv.ItemProgramPricingID=ipp.id

    JOIN Programs...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need help on SQL Query

    Deleted

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need help on SQL Query

    Deleted

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to add previous row end date as the next row start date?

    SELECT a.ID

    ,DATEADD(day,ISNULL(SUM(b.AddDays),0),GETDATE())

    ,DATEADD(day,a.AddDays+ISNULL(SUM(b.AddDays),0),GETDATE())

    FROM #mytable a

    LEFT JOIN #mytable b ON b.ID < a.ID

    GROUP BY a.ID,a.AddDays

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Receiving Correct Output

    Why are you posting this again when the solution was posted in another topic?

    You cannot pass a variable number of columns to reporting services.

    You have to use a matrix...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Help finding a date

    ;WITH cte (RowID, slot_col1, time_sched_start_dt, time_sched_end_dt)

    AS (

    SELECT ROW_NUMBER() OVER (ORDER BY a.time_sched_start_dt),

    slot_col1, time_sched_start_dt, time_sched_end_dt

    FROM #return_schedule a

    ),

    cte2 (GroupID, time_sched_start_dt, time_sched_end_dt)

    AS (

    SELECT RowID-ROW_NUMBER() OVER (ORDER BY time_sched_start_dt),

    time_sched_start_dt, time_sched_end_dt

    FROM cte

    WHERE slot_col1...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Help finding a date

    Removed as wrong solution

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Getting Specific Months

    waseemshaikh345 (6/19/2014)


    Hey David, for the YTD, which totals the months funded contracts is there a different type of expression for it? or do I need to filter it?

    You will have...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Getting Specific Months

    Set the expression for the Hidden property for the January column to

    =Switch(1<Month(Parameters!StartDate.Value),True,1>=Month(Parameters!EndDate.Value),True,1>=Month(Today),True,True,False)

    February to

    =Switch(2<Month(Parameters!StartDate.Value),True,2>=Month(Parameters!EndDate.Value),True,2>=Month(Today),True,True,False)

    etc

    Note that based on your requirements no data will be shown when the report is run in January

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Getting Specific Months

    Why would having it as a table or matrix make any difference to the output?

    If you want to persist with a table then hide columns that do not correspond to...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Get specific Months user Inputs

    Removed as per previous post :doze:

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 661 through 675 (of 3,544 total)