Forum Replies Created

Viewing 12 posts - 31 through 42 (of 42 total)

  • RE: Sort by/Order By

    Thanks everyone for your help, but I am new to SQL so I maybe not getting across what I need, so apologies for that.

    Below is my entire string, as you...

  • RE: Sort by/Order By

    Hi Jason

    Thanks for that, but I need to know how to add a sort to the SQL Code, not the query. It maybe me not making it clear and I...

  • RE: Sort by/Order By

    Hi Gail

    Thank you for your replies, however I have been tasked with making sure that the Month name is already ordered in Jan, Feb etc when query is made, so...

  • RE: Sort by/Order By

    Hi Gail

    Do you mean:

    DATENAME(MONTH,@StartDate) AS CalendarMonth, <------ Add an ORDER BY Somewhere here

    or actually on the query, because I have been asked to hardcode it in the code like I...

  • RE: Sort by/Order By

    Morning All

    Thanks for all your replies and help I just wanted to share with you the code that I have built which populates multiple columns and puts the Financial Month...

  • RE: Sort by/Order By

    Hi Sean

    Would it be possible to add a 0 in front of the first 9 numbers, would this make it easier?

    Thanks

    Wayne

  • RE: Sort by/Order By

    Hi Lynn

    Here is my query.

    USE Occupancy

    CREATE TABLE Time2

    (Datedate not null,

    CalendarYearint not null,

    CalendarMonthvarchar (30) not null,

    FinancialYearint not null,

    FinancialMonthvarchar (30) not null)

    DECLARE

    @StartDate Date,

    @EndDate Date

    SET @StartDate = '01 Jan 2010'

    SET...

  • RE: Adding new columns to a table using the datepart function SQL

    I would like to say thank you for all you help, I have now created the table (the wrong way). And now have another task to complete (See other thread...

  • RE: Adding new columns to a table using the datepart function SQL

    You're right about pain, he said I will give you a easy task first, I have been trying to figure this oout now for a day and a half. Anway...

  • RE: Adding new columns to a table using the datepart function SQL

    Hi Jason

    I have been on this now for hours and getting so frustrated, you mentioned yesterday about loops on another post I had but my boss wants me to use...

  • RE: While/Loop Help

    Hi Phil

    Thanks for you replies, the calendar template option will be something I will use in the future but I would like to learn about loops. This is why I...

  • RE: While/Loop Help

    thanks for the quick replies, because I am learning I have decided to just populate the first column with a date say 01/01/2010 and then increase this in increments of...

Viewing 12 posts - 31 through 42 (of 42 total)