Viewing 15 posts - 16 through 30 (of 42 total)
Hi Dwain
I have tried to breakdown what I need below, I hope this helps.
Thanks
Wayne
Step 1
Arrival Date (Already generated) – 1.35 Million Times
Step 2
Randomise a number between 0 and 1
Step...
February 20, 2013 at 8:27 am
Hi Dwain
Thanks for the link but to be honest its way above where I am in my training (I'm 4 weeks in) and to be honest that looks like a...
February 20, 2013 at 7:20 am
I have just been told I have done it completely wrong by my boss and the query above hasn't randomised anything on our data, I have got 48000 records with...
February 20, 2013 at 7:02 am
Its alright I have figured it out:
SELECT ArrivalDate, DATEADD(day, -1 + RAND(checksum(NEWID()))*-90
, ArrivalDate) AS BookingDate
FROM Bookings
ORDER BY ArrivalDate
February 20, 2013 at 5:30 am
Hi Gazareth
Thanks for your help, I should have known to change the start date to the date I wanted, I have done this now
CASE
WHEN YEAR(@StartDate) = 2010 AND (SELECT SiteWeighting...
February 13, 2013 at 4:50 am
Hi Gazareth
I am getting the following error message, Msg 206, Level 16, State 2, Line 32
Operand type clash: int is incompatible with date. Also as you can see from the...
February 13, 2013 at 4:13 am
Thanks everyone, I have sorted it now with your help (See below for final code), however I now need to populate the table with 4 more years worth of dates...
February 13, 2013 at 3:02 am
Site Table
Site_SkeySiteCodeSiteNameBDMRegionSiteWeighting
16000AdgestoneRoger GreenEast1
26001Aldridge HillRoger GreenEast4
36002Alton The StarRoger GreenEast4
46003ArdgartenRoger GreenEast1
56004AshbourneRoger GreenEast1
66005AshurstRoger GreenEast1
76006BakewellRoger GreenEast2
86007BalaRoger GreenEast1
96008Barnard CastleRoger GreenEast3
106009Beadnell BayRoger GreenEast2
Site Table
PitchType_SkeyPitchTypeCodePitchDescriptionPitchTypeWeighting
11Grass4
22Grass With Electric3
33Hardstanding2
44Hardstanding With Electric4
55Self Catering1
66Pods/Dens1
77Seasonal1
It was in table form but it looks...
February 12, 2013 at 10:51 am
This is the complete code:
CREATE TABLE Capacity
(StartDate DATE not null,
EndDate DATE not null,
Quantity INT not null,
PitchType_Skey int not null,
Site_Skey int not null)
DECLARE @PitchType_Skey INT
DECLARE @Site_Skey INT
DECLARE @Capacity INT
DECLARE @StartDate DATE
DECLARE...
February 12, 2013 at 10:21 am
Hi Sean
Thank you for that, but it still doesn't populate my table. Any ideas why not because I haven't got the foggiest?
DECLARE @PitchType_Skey INT
DECLARE @Site_Skey INT
DECLARE @Capacity INT
DECLARE @StartDate DATE
DECLARE...
February 12, 2013 at 10:05 am
I have a Site Table that has a Site Weighting Column, each Site is weighted between 1 and 4, I am currently working on the Capacity table and want to...
February 12, 2013 at 9:48 am
Thank you everyone, all you input has invaluable and I know where to come with my next problem which will be Monday without a doubt.
Speak soon have a good weekend.
February 8, 2013 at 7:08 am
Hi Lynn
Yes I knew that, the questions isn't really about about querying the data, I know there are plenty of ways to get the information from a query. What the...
February 8, 2013 at 6:53 am
Hi Chris
Not exactly like the FinancialMonth line just something similar.
Thanks
Wayne
February 8, 2013 at 6:05 am
Viewing 15 posts - 16 through 30 (of 42 total)