Forum Replies Created

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

  • RE: One Dataset populating multiple Reports

    Thanks Ray, all sorted now.

  • RE: Case Statement - DateDiff and DatePart

    Don't worry all sorted:

    Declare @DOB Datetime

    Declare @Today Datetime

    Set @DOB = '01 November 1971'

    Set @Today = '01 November 2011'

    SELECT

    CASE WHEN DatePart(Month, @Today) < Datepart(Month,@DOB) THEN (Datediff(Year,@DOB,@Today) - 1)

    WHEN DatePart(Month, @Today)...

  • RE: Using an amemded @From and @To date to get a new result

    Thanks Chris, I have figured it out now:

    Declare @From Datetime

    Declare @To Datetime

    Set @From = '07 Jan 2013'

    Set @To = '18 Mar 2013'

    SELECT Datediff(Week, dateadd(dd, CASE WHEN datepart(weekday,...

  • RE: Updating a % of cells in a Column

    Thanks Chris, Post edited.

  • RE: Query - Pulling Data from another table

    Hi Kingston

    I didn't think of that and I should have, each price is a daily price so if the price for a pitch is £9.00 on the 31/01/2010 and the...

  • RE: Query - Pulling Data from another table

    Hi Kingston

    That's has worked thank you so much, I cannot believe it was one line of code.

    Thanks again

    Wayne

  • RE: Query - Pulling Data from another table

    Booking_SkeyBookingNumberArrivalDateDepartureDateBookingDateCancelledDateBookingValuePitchType_SkeySite_Skey

    1B000000012010-01-022010-01-232009-12-26NULLNULL42

    PitchValues_SkeyPitchType_SkeyStartDateEndDateValue

    442010-01-012010-12-3120.00

    1142011-01-012011-12-3121.60

    1842012-01-012012-12-3122.70

    2542013-01-012013-12-3122.70

  • RE: Query - Pulling Data from another table

    What is DDL?

  • RE: Update query will not run?

    Thanks MM saves a lot of time knowing that.

  • RE: Update query will not run?

    Thanks everybody I really do appreciate the help, one question though. When you provide the script/query/code (see I have no idea) is there any other way to copy it without...

  • RE: Update query will not run?

    This is what my table looks like:

    Booking_SkeyBookingNumberArrivalDateDepartureDateBookingDateCancelledDateBookingValuePitchType_SkeySite_Skey

    1B000000012010-01-022010-01-232009-12-26NULLNULL42

    2B000000022010-01-022010-01-052009-12-26NULLNULL42

    3B000000032010-01-022010-01-052009-12-04NULLNULL42

    4B000000042010-01-022010-01-162010-01-02NULLNULL42

    5B000000052010-01-022010-01-042009-12-26NULLNULL42

    6B000000062010-01-022010-01-292009-12-22NULLNULL42

    7B000000072010-01-032010-01-312009-10-05NULLNULL42

    8B000000082010-01-032010-01-242010-01-01NULLNULL42

    9B000000092010-01-042010-01-242010-01-03NULLNULL42

    10B000000102010-01-042010-01-062009-12-28NULLNULL42

    I hope that helps.

    Thanks

  • RE: Update query will not run?

    Hi Dwain,

    I didn't mean to offend you, if that's the case I am sorry. My boss helped me with that query, is it not right?

    1.35 Million Records of which

    30%...

  • RE: Update query will not run?

    I was given a simple way of doing this:

    UPDATE BOOKINGS

    SET DepartureDate =

    DATEADD(day,

    CASE WHEN Rand(CHECKSUM(NEWID())) BETWEEN 0 and 0.3 THEN 2 ELSE

    CASE WHEN Rand(CHECKSUM(NEWID())) BETWEEN 0.3 and...

  • RE: Creating a Ref Number usning letters and numbers.

    Hi Dwain

    For some reason that didn't work, but I found another solution.

    USE Occupancy

    Update t

    Set BookingNumber = 'B' + Right ('00000000' + CAST (Seq AS varchar (30)), 8)

    FROM (SELECT *,ROW_NUMBER() OVER...

  • RE: Update query will not run?

    Thank you for that I will try and get my head around it tomorrow.

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