Viewing 15 posts - 1 through 15 (of 20 total)
declare FlightClosedList cursor FAST_FORWARD for
April 30, 2012 at 3:17 pm
each table had like 236518 rows; so that might be why it is slow; but when i drop all those rows and only have 4 rows it works fine.
April 30, 2012 at 3:06 pm
okay this is working on a small data set but with the larger data set it doesn't work out so well
April 30, 2012 at 2:59 pm
i debug and when it reaches the fetch next from it goes into debugging query neverland..........
April 30, 2012 at 2:51 pm
why the heck does it not work over here - like it's walking around the planet then to mars and back --- so don't get it
April 30, 2012 at 2:49 pm
dang
INSERT INTO [dbo].[flightsClosed]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1252015
,44
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1253031
,44
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed2]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1252015
,45
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed2]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1253031
,45
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
April 30, 2012 at 2:37 pm
quotes
INSERT INTO [dbo].[flightsClosed]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1252015
,44
,4
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1253031
,44
,4
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed2]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1252015
,45
,4
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
INSERT INTO [dbo].[flightsClosed2]
([FlightID]
,[StatusTypeID]
,[AircraftID]
,[FlightTime]
,[BlockTime]
,[TTEngine1]
,[TCEngine1]
,[TTEngine2]
,[TCEngine2]
,[Registration]
,[TTAirframe]
,[TCairframe])
VALUES
(1253031
,45
,4
,4
,2.30
,2.50
,2884.80
,2321.00
,2702.10
,2040.00
,'N106sl'
,8849.00
,6351.00)
GO
April 30, 2012 at 2:28 pm
INSERT INTO [dbo].[flightsClosed]
([FlightID]
,[StatusTypeID]
...
April 30, 2012 at 2:03 pm
both tables are the same minus the names.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[flightsClosed](
[recid] [int] IDENTITY(1,1) NOT NULL,
[FlightID] [int] NULL,
[StatusTypeID] [int] NOT NULL,
[AircraftID] [int] NULL,
[FlightTime] [decimal](10, 2) NULL,
[BlockTime] [decimal](10, 2)...
April 30, 2012 at 1:56 pm
true
recidFlightIDStatusTypeIDAircraftIDFlightTimeBlockTimeTTEngine1TCEngine1TTEngine2TCEngine2RegistrationTTAirframeTCairframerecidFlightIDStatusTypeIDAircraftIDFlightTimeBlockTimeTTEngine1TCEngine1TTEngine2TCEngine2RegistrationTTAirframeTCairframe
118181012520154442.302.502884.802321.002702.102040.00N106SL8849.006351.0070882512520153742.302.402884.802321.002702.102040.00N106SL8846.706350.00
118194712530314440.600.902884.202320.002701.502039.00N106SL8849.006351.0070896212530311440.600.902884.202320.002701.502039.00N106SL8846.706350.00
April 30, 2012 at 1:55 pm
so that sent back 2 emails:
Flight ID: 1 is now closed.
Actual Flight: 10.00
Actual Block: 10.00
Hours End: 10.00
Landings End: 10.00
Engine 1 Hours End: 10.00
Engine 1 Cycles End: 10.00
Engine 2 Hours End:...
April 30, 2012 at 1:49 pm
why not do if the rows exists then copy to temp table then send email for all rows in temp table and exit when done? that was my thought...
April 30, 2012 at 1:37 pm
yah - this just spins away for minutes with nothing happening
April 30, 2012 at 1:34 pm
yup populated with real values and right now there are only two rows that are different
April 30, 2012 at 1:25 pm
Viewing 15 posts - 1 through 15 (of 20 total)