Help with a While/Loop Query

  • 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 CalendarMonth FinancialYear FinancialMonth

    01 Jan 2011 2011 January 2010 January

    02 Jan 2011 2011 January 2010 January

    03 Jan 2011 2011 January 2010 January

    04 Jan 2011 2011 January 2010 January

    05 Jan 2011 2011 January 2010 January

    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

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

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