Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)

  • RE: Backup error "3266". incorrectly formatted

    It is second backup and still the same.

    Is it possible that MD5 sums are the same if file was corrupted during compression or transfer?

  • RE: Dynamic Columns - Cash Flow problem

    There is one more issue on this 😉

    Having code:

    DECLARE

    @startdate nvarchar(10), --cast datetime

    @periodlength...

  • RE: Dynamic Columns - Cash Flow problem

    I would like to thank everybody for helping me with this problem.

    It is good to learn something new especially when you can ask if there are any problems.

  • RE: Dynamic Columns - Cash Flow problem

    Maybe final ver:

    DECLARE

    @startdate nvarchar(10), --cast datetime

    @periodlength nvarchar(20), --cast int

    @periodsnumber nvarchar(20), --cast...

  • RE: Dynamic Columns - Cash Flow problem

    periodlength = 30

    periodsnumber = 5

    irobertson way result:

    PartnerDebit15.8010.50NULLNULLNULLNULLNULLNULLNULLNULL

    PartnerCredit27.4017.60NULLNULLNULLNULLNULLNULLNULLNULL

    AccountDebit15.5010.30NULLNULLNULLNULLNULLNULLNULLNULL

    AccountCredit27.1018.20NULLNULLNULLNULLNULLNULLNULLNULL

    TotalTotal85.8056.60NULLNULLNULLNULLNULLNULLNULLNULL

    WayneS way result (only 5 cols...):

    Partner Debit15.8010.500.000.000.00

    Partner Credit27.4017.600.000.000.00

    Account Debit15.5010.300.000.000.00

    Account Credit27.1018.200.000.000.00

    Total85.8056.600.000.000.00

    my sql result:

    Partner Debit15.8010.500.000.000.000.000.000.000.000.00

    Partner Credit27.400.0017.600.000.000.000.000.000.000.00

    Account Debit15.500.0010.300.000.000.000.000.000.000.00

    Account Credit27.100.0018.200.000.000.000.000.000.000.00

    ...

  • RE: Dynamic Columns - Cash Flow problem

    Almost working:

    DECLARE

    @startdate nvarchar(10), --cast datetime

    @periodlength nvarchar(20), --cast int

    @periodsnumber nvarchar(20), --cast int

    @ph...

  • RE: Dynamic Columns - Cash Flow problem

    irobertson (9/2/2010)


    Try this (note not now split into two chunks, so table rewrites every time:

    Now it is OK but like for me it is quite complicated. WayneS is simplier and...

  • RE: Dynamic Columns - Cash Flow problem

    irobertson (9/2/2010)


    What errors do you get? Works fine for me?

    Msg 139, Level 15, State 1, Line 0

    Cannot assign a default value to a local variable.

    Msg 137, Level 15, State 2,...

  • RE: Dynamic Columns - Cash Flow problem

    irobertson I still get errors with your code

    Meanwhile I was trying to modify WayneS solution.

    I think it should work but there are still errors. I think there is problem with...

  • RE: Dynamic Columns - Cash Flow problem

    WayneS, Result seems to be OK but there are fixed 5 periods and they have to be dynamic. I should be able to exec this with 3 or 20 periods.

    irobertson...

  • RE: Dynamic Columns - Cash Flow problem

    gah (9/1/2010)

    just a thought....maybe I am missing the point but:

    this is a cashflow forecast right?

    why are you summing all entries?

    surely either a debit or credit should be a negative, dependent...

  • RE: Dynamic Columns - Cash Flow problem

    LutzM (9/1/2010)


    @Bezan:

    Would you mind adding your requested result based on your sample data so we have something to compare with?

    Irobertson does an excellent job by continuously providing answers to every...

  • RE: Dynamic Columns - Cash Flow problem

    irobertson (9/1/2010)


    Hi,

    This should get you the data you need, it's then just a case of using the previous advice on dynamic pivots to get the data into the display format...

  • RE: Dynamic Columns - Cash Flow problem

    I`ve read both articles but still I`m not sure how to do this.

    Variables for SQL (...in final ver):

    DECLARE

    @startdate datetime,

    @periodlength int,

    @periodsnumber int,

    @ph nvarchar(3),

    @acc nvarchar(3)

    SET @date =...

  • RE: Dynamic Columns - Cash Flow problem

    Thanks for so fast answer. I will check this article and maybe it helps. Otherwise I will post again 😉

Viewing 15 posts - 1 through 15 (of 15 total)