While/Loop Help

  • Good Morning

    I am new to T-Sql and I have been taske with creating a simple Time table with four columns:

    Date date not null,

    CalendarYear int not null,

    CalendarMonth varchar (30) not null,

    FinancialYear int not null,

    FinancialMonth varchar (30) not null)

    And what I would like to do is populate the Date column with dates from 01/01/2011 upto 31/03/2015 and the other columns will self populate:

    Example:

    Date CalendarYear CalendarMonthFinancialYearFinancialMonth

    01 Jan 20112011 January 2010 January

    02 Jan 20112011 January 2010January

    03 Jan 20112011 January 2010January

    04 Jan 20112011 January 2010January

    05 Jan 20112011 January 2010January

    Can you help?

    Thanks

    Wayne

  • dont cross post, it fragments replies and wastes peoples time

    all replies here http://www.sqlservercentral.com/Forums/Topic1416459-1292-1.aspx

  • Moved to oher post due to cross in Anthony's

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply