Forum Replies Created

Viewing 15 posts - 16 through 30 (of 72 total)

  • RE: INSERT fails

    Hi John

    Yes, you are right. I'm just having a blonde moment. There is an IDENTITY key word in the other PK.

    Thanks for showing me the error of my...

  • RE: INSERT fails

    Hi John

    I thought SQL would automatically insert values if it's a PK. Did I think wrong? I will research it, thanks.

  • RE: expanding the keyword AS

    Thanks Louis, I will see if there is something on SSIS/SSAS that I can use.

  • RE: expanding the keyword AS

    Thanks. I will look into it

  • RE: expanding the keyword AS

    Hi

    No, it should use the getdate function, so that I can advance it to the next month without hard coding the date

  • RE: expanding the keyword AS

    Hi

    Thank you for your response.

    I most probably didn't make myself clear, my apologies.

    It should be something like the following:

    Select 1 AS Month1: 07/07/2015 where the part after the AS keyword...

  • RE: advancing dates

    Oh, ok. Thanks. It worked!

  • RE: advancing dates

    Thank you both for your reply but the integer dates are still hard-coded in your answers. And that's the problem that I have. Instead of 20141106 (hard-coded) I...

  • RE: this code works but looks ugly.

    Thanks Stuart. You took the ugliness out of the code. 😀

  • RE: this code works but looks ugly.

    Hi Stuart

    Thanks for replying. Here is some sample data from the calendardefinition table:

    KeyDateTransDateSmallTransDateNumericTransPeriodTransWeekOfYearNumberTransWeekOfYearDescrTransWeekOfMonthNumberTransWeekOfMonthDescrTransMonthDescrTransMonthNumberTransYearNumber

    1NULLNULLNULLNULLNULL0NULLNULLNULL

    201/01/1980 00:00198001011980.0111980 Week 0111980.01 Week 1January11980

    302/01/1980 00:00198001021980.0111980 Week 0111980.01 Week 1January11980

    403/01/1980 00:00198001031980.0111980 Week 0111980.01 Week 1January11980

    504/01/1980 00:00198001041980.0111980...

  • RE: Derived table query

    Thanks Chris.

    The problem that I have is that in the main query them MIN_keydate and MAX_keydate have null values, which creates a problem for me. Is there any way...

  • RE: Derived table query

    Hi Chris

    Can I, for the last time, just run some idea with you, if you don't mind.

    Kind regards

    Fred

  • RE: Derived table query

    can you assist me with option two, please?

    I have to be out of office in the next ten minutes and then should be at home in about three...

  • RE: Derived table query

    yes, that is quite correct

  • RE: Derived table query

    sorry, forgot about the difference in dates. Here is sample data

    (shortened as for space):

    KeyDepotKeyItemMIN_keydateMAX_keydate

    511031221712541

    1075181223412524

    6194751221812218

    6322101223712541

    1580991224712509

    624951222712541

    6165581221812218

    15367241221012503

    580271234212523

    4363041221912219

    4108341221912403

Viewing 15 posts - 16 through 30 (of 72 total)