/*
-- ldtestdata.sql


-- SQL File to load test data into the data base.

-- Programmed by Ron Yurow

-- Last Update:		16 FEBRUARY 	1995, VERSION 1.0
			10 MARCH	1995, VERSION 1.1
			14 MARCH	1995, VERSION 1.2
			10 APRIL	1995, VERSION 1.3
			12 APRIL	1995, VERSION 1.4
			19 APRIL	1995, VERSION 1.5	

-- ===========================================================================

*/
-- This SQL script file loads a set of test data into the SoHO Online Data
-- Catalog.  Currently only data for the Instiutes and Campaign tables is
-- is loaded.  Before data for any table is inserted, all the data in the 
-- in the database is cleared.  This will ensure that after this script file
-- is run the database contains a known data set.

-- Delete all rows in the database

DELETE FROM COMMENT_INSTITUTES ;

DELETE FROM INSTITUTES ;

DELETE FROM COMMENT_CAMPAIGN ;

DELETE FROM CAMPAIGN ;

DELETE FROM COMMENT_EVENTS ; 

DELETE FROM EVENTS ;

-- Add rows to the Campaign Database

-- Add campaign number 1 into campaign table.
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          0,
          -- Campaign Name
          'Null Campaign',
          -- Campaign Type
          'No Campaign Type',
          -- Campaign Description
          'This campaign defines the NULL campaign',
          -- Starting date of campaign
          '1996/08/01',
          -- Ending date of campaign
          NULL,
          -- Observer in charge
          'J. Len Culhane',
          -- Comments available
          'N',
          -- Date record was last updated
          '1994/04/15',
          -- Time record was last updated
          to_char(sysdate, 'HH:MI:SS.SS')
         )
       ;
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          1,
          -- Campaign Name
          'Coronal Hole Study',
          -- Campaign Type
          'CAMPAIGN',
          -- Campaign Description
          'To determine the underling structure of coronal holes.',
          -- Starting date of campaign
          '1996/08/01',
          -- Ending date of campaign
          NULL,
          -- Observer in charge
          'J. Len Culhane',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1994/04/15',
          -- Time record was last updated
          '10:05:06.000'
         )
       ;
          	
-- Add campaign number 2 into campaign table.
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          2,
          -- Campaign Name
          'High Velocity Event Study',
          -- Campaign Type
          'CAMPAIGN',
          -- Campaign Description
          'To obtain detailed information about high velocity events on the ' ||
          'Sun''s surface.',
          -- Starting date of campaign
          '1995/11/15',
          -- Ending date of campaign
          NULL,
          -- Observer in charge
          'Eric R. Priest',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1994/04/08',
          -- Time record was last updated
          '16:02:15.000'
         )
       ;

-- Add campaign number 3 into campaign table.
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          3,
          -- Campaign Name
          'Helium Enhancement in the Quiet Sun',
          -- Campaign Type
          'CAMPAIGN',
          -- Campaign Description
          'To compare Helium lines in the quiet sun with other lines',
          -- Starting date of campaign
          '1996/11/12',
          -- Ending date of campaign
          NULL,
          -- Observer in charge
          'Carole Jordan',
          -- Comments available
          'N',
          -- Date record was last updated
          '1994/06/28',
          -- Time record was last updated
          '10:28:25.000'
         )
       ;

-- Add campaign number 4 into campaign table.
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          4,
          -- Campaign Name
          'Wave Observation',
          -- Campaign Type
          'CAMPAIGN',
          -- Campaign Description
          'Detect extremely low frequency waves in the Sun''s corona.',
          -- Starting date of campaign
          '1995/12/15',
          -- Ending date of campaign
          NULL,
          -- Observer in charge
          'Jim Lang',
          -- Comments available
          'N',
          -- Date record was last updated
          '1994/04/29',
          -- Time record was last updated
          '16:10:04.000'
         )
       ;

-- Add campaign number 5 into campaign table.
INSERT INTO campaign 	
         (cmp_no,
          cmp_name,
          cmp_type,
          cmp_desc,
          date_obs,
          date_end,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          5,
          -- Campaign Name
          'CDS NIS Test Study',
          -- Campaign Type
          'CAMPAIGN',
          -- Campaign Description
          'To determine the baseline respsonse of the CDS Normal ' || 
          'Incidence Spectrometer.',
          -- Starting date of campaign
          '1995/11/10',
          -- Ending date of campaign
          '1996/02/07',
          -- Observer in charge
          'Richard Harrison',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1994/04/11',
          -- Time record was last updated
          '14:12:39.000'
         )
       ;

-- Add rows to the Comment Campaign Database

-- Add comment number 1 into comment_campaign table.
INSERT INTO comment_campaign 	
         (comm_no,
          cmp_no,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          1,
          -- Campaign Number 
          2,
          -- Comment Text
          'This study was based on results from the CPAS high energy pion ' || 
          'detector at CERN.',
          -- Date record was last updated
          '1995/02/14',
          -- Time record was last updated
          '11:30:00.000'
         )
       ;

-- Add comment number 2 into comment_campaign table.
INSERT INTO comment_campaign 	
         (comm_no,
          cmp_no,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          2,
          -- Campaign Number 
          1,
          -- Comment Text
          'Dr. Henry Gonzolos made significant contributions in the ' ||
          'design and planning phases of this campaign.',
          -- Date record was last updated
          '1995/02/14',
          -- Time record was last updated
          '11:41:00.000'
         )
       ;

-- Add comment number 3 into comment_campaign table.
INSERT INTO comment_campaign 	
         (comm_no,
          cmp_no,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          3,
          -- Campaign Number 
          1,
          -- Comment Text
          'This campaign is being conducted with assistence from the ' || 
          'National Institute for Astrophsysics (NIA) at Perdue University.',
          -- Date record was last updated
          '1995/02/14',
          -- Time record was last updated
          '11:47:00.000'
         )
       ;

-- Add comment number 4 into comment_campaign table.
INSERT INTO comment_campaign 	
         (comm_no,
          cmp_no,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          4,
          -- Campaign Number 
          5,
          -- Comment Text
          'The results of this study showed that the Normal Incidence ' ||
          'Spectrometer on the Coronal Diagnostic Spectrometer functions ' ||
          'extremely well and should be the source of some valueable ' ||
          'data.  Kudos to the design team for a job well done!' ,
          -- Date record was last updated
          '1995/02/14',
          -- Time record was last updated
          '12:00:00.000'
         )
       ;

-- Add institute 1 for campaign number 1 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,	
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          1,
          -- Institute Index
          1,
          -- Institution
          'University of Maryland, Department of Physics',
          -- Observer in Charge
          'Dr. Jason Sandoz',
          -- Comments available
          'N',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:00:00.000'
         )
       ;

-- Add institute 2 for campaign number 1 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          1,
          -- Institute Index
          2,
          -- Institution
          'Clark Institute for Solar Science',
          -- Observer in Charge
          'Dr. Alexandra Carson',
          -- Comments available
          'N',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:00:00.000'
         )
       ;

-- Add institute 1 for campaign number 2 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          2,
          -- Institute Index
          1,
          -- Institution
          'Nebraska University Solar Astronomy Institute',
          -- Observer in Charge
          'Dr. Landis White',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:31:00.000'
         )
       ;

-- Add institute 2 for campaign number 2 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          2,
          -- Institute Index
          2,
          -- Institution
          'Institute d''Astronomme Soleil',
          -- Observer in Charge
          'Dr. Rene Duval',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:41:00.000'
         )
       ;

-- Add institute 1 for campaign number 3 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          3,
          -- Institute Index
          1,
          -- Institution
          'Mt. Clairmont Solar Telescope',
          -- Observer in Charge
          'Dr. Jason Burger',
          -- Comments available
          'Y',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:45:00.000'
         )
       ;

-- Add institute 1 for campaign number 4 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          4,
          -- Institute Index
          1,
          -- Institution
          'Nebraska University Solar Astronomy Institute',
          -- Observer in Charge
          'Dr. Nate Willis',
          -- Comments available
          'N',
          -- Date record was last updated
          '1995/02/16',
          -- Time record was last updated
          '10:43:00.000'
         )
       ;

-- Add institute 2 for campaign number 4 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          4,
          -- Institute Index
          2,
          -- Institution
          'Space Science Institute',
          -- Observer in Charge
          'Dr. Bruce Mitchell',
          -- Comments available
          'N',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:45:00.000'
         )
       ;

-- Add institute 3 for campaign number 4 into institutes table.
INSERT INTO institutes 	
         (cmp_no,
          inst_ind,
          institut,
          observer,
          comments,
          date_mod,
          time_mod)
       VALUES
         (
          -- Campaign Number 
          4,
          -- Institute Index
          3,
          -- Institution
          'University of Maryland, Department of Physics',
          -- Observer in Charge
          'Dr. Erika Weber',
          -- Comments available
          'N',
          -- Date record was last updated
          '1995/02/15',
          -- Time record was last updated
          '12:00:00.000'
         )
       ;

-- Add rows to the Comment Institutes Database

-- Add comment number 1 into comment_institutes table.
INSERT INTO comment_institutes	
         (comm_no,
          cmp_no,
          inst_ind,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          1,
          -- Campaign Number 
          2,
          -- Institute Index
          1,
          -- Comment Text
          'Dr. Landis White also participated in research on high ' || 
          'solar flares at Kitt Peak Observatory.',
          -- Date record was last updated
          '1995/02/17',
          -- Time record was last updated
          '11:17:00.000'
         )
       ;

-- Add comment number 2 into comment_institutes table.
INSERT INTO comment_institutes	
         (comm_no,
          cmp_no,
          inst_ind,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          2,
          -- Campaign Number 
          2,
          -- Institute Index
          1,     
          -- Comment Text
          'All work by the Nebraska University Solar Astronomy Institute on ' ||
          'this project was supported by a federal grant from the National ' ||
          'Solar Science Initiative',
          -- Date record was last updated
          '1995/02/17',
          -- Time record was last updated
          '11:22:00.000'
         )
       ;

-- Add comment number 3 into comment_institutes table.
INSERT INTO comment_institutes 	
         (comm_no,
          cmp_no,
          inst_ind,
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          3,
          -- Campaign Number 
          2,
          -- Institute Index
          2,
          -- Comment Text
          'This institution has a WWW Home Page at url: http:/www.ias.' ||
          '.astronomme.fr/',
          -- Date record was last updated
          '1995/02/17',
          -- Time record was last updated
          '11:32:00.000'
         )
       ;

-- Add comment number 4 into comment_institutes table.
INSERT INTO comment_institutes 	
         (comm_no,
          cmp_no,
          inst_ind, 
          comment_text,
          date_mod,
          time_mod)
       VALUES
         (
          -- Comment Number
          4,
          -- Campaign Number 
          3,
          -- Institute Index
          1,     
          -- Comment Text
          '' ||
          'A Detailed line list and catalog of science data resulting ' ||
          'from studies conducted at Mt. Clairmont Solar Telescope can ' ||
          'be obtained by sending e-mail to scidata@mcst.astro.starnet' ,
          -- Date record was last updated
          '1995/02/17',
          -- Time record was last updated
          '12:40:00.000'
         )
       ;

-- Add rows to the event table

-- Add event number 1 into events table.
INSERT INTO events 	
         (event_no,
          ev_class,
          ev_type,
          ev_desc,
          date_ev,
          date_end,
          y_pos,
          z_pos,
          y_end,
          z_end,
          origin,
          comments,
          date_mod)
       VALUES
         (
          -- Event Number 
          1,
          -- Event Class
          'SOLAR',
          -- Event Type
          'FLARE', 
          -- Event Description
          'High Velocity Solar Flare',
          -- Starting Date and Time of Event
          '1997/03/11 11:37:20.000',
          -- Ending Date and Time of Event
          '1997/03/11 12:06:13.000',
          -- Starting Y Position of Event 
          156.52,
          -- Starting Z Position of Event
          20.21,
          -- Ending Y Position of Event
          150.52,
          -- Ending Z Position of Event
          12.33,
          -- Origin of Event Report
          'SMOCC',
          -- Comments Available
          'Y',
          -- Date and Time Record was Last Updated
          '1995/04/10 15:18:00.000'
         )
       ;

-- Add event number 2 into events table.
INSERT INTO events 	
         (event_no,
          ev_class,
          ev_type,
          ev_desc,
          date_ev,
          date_end,
          y_pos,
          z_pos,
          y_end,
          z_end,
          origin,
          comments,
          date_mod)
       VALUES
         (
          -- Event Number 
          2,
          -- Event Class
          'SPACECRAFT',
          -- Event Type
          'ROLL', 
          -- Event Description
          'Spacecraft Attitude Adjustment',
          -- Starting Date and Time of Event
          '1996/10/09 03:44:11.000',
          -- Ending Date and Time of Event
          '1997/10/09 03:56:43.000',
          -- Starting Y Position of Event 
          NULL,
          -- Starting Z Position of Event
          NULL,
          -- Ending Y Position of Event
          NULL,
          -- Ending Z Position of Event
          NULL,
          -- Origin of Event Report
          'BIG BEAR',
          -- Comments Available
          'N',
          -- Date and Time Record was Last Updated
          '1995/04/12 10:34:00.000'
         )
       ;

-- Add event number 3 into events table.
INSERT INTO events 	
         (event_no,
          ev_class,
          ev_type,
          ev_desc,
          date_ev,
          date_end,
          y_pos,
          z_pos,
          y_end,
          z_end,
          origin,
          comments,
          date_mod)
       VALUES
         (
          -- Event Number 
          3,
          -- Event Class
          'SOLAR',
          -- Event Type
          'FLARE', 
          -- Event Description
          'Magnetic Flux',
          -- Starting Date and Time of Event
          '1998/06/30 23:50:22.000',
          -- Ending Date and Time of Event
          '1998/07/01 00:22:55.000',
          -- Starting Y Position of Event 
          33.50,
          -- Starting Z Position of Event
          41.77,
          -- Ending Y Position of Event
          12.80,
          -- Ending Z Position of Event
          16.90,
          -- Origin of Event Report
          'KITT PEAK',
          -- Comments Available
          'N',
          -- Date and Time Record was Last Updated
          '1995/04/12 10:40:00.000'
         )
       ;

-- Add event number 4 into events table.
INSERT INTO events 	
         (event_no,
          ev_class,
          ev_type,
          ev_desc,
          date_ev,
          date_end,
          y_pos,
          z_pos,
          y_end,
          z_end,
          origin,
          comments,
          date_mod)
       VALUES
         (
          -- Event Number 
          4,
          -- Event Class
          'SOLAR',
          -- Event Type
          'FLARE', 
          -- Event Description
          'High Velocity Solar Flare',
          -- Starting Date and Time of Event
          '1997/03/11 11:37:20.000',
          -- Ending Date and Time of Event
          '1997/03/11 12:06:13.000',
          -- Starting Y Position of Event 
          156.52,
          -- Starting Z Position of Event
          20.21,
          -- Ending Y Position of Event
          150.52,
          -- Ending Z Position of Event
          12.33,
          -- Origin of Event Report
          'SMOCC',
          -- Comments Available
          'N',
          -- Date and Time Record was Last Updated
          '1995/04/10 15:18:00.000'
         )
       ;

-- Add event number 5 into events table.
INSERT INTO events 	
         (event_no,
          ev_class,
          ev_type,
          ev_desc,
          date_ev,
          date_end,
          y_pos,
          z_pos,
          y_end,
          z_end,
          origin,
          comments,
          date_mod)
       VALUES
         (
          -- Event Number 
          5,
          -- Event Class
          'SPACECRAFT',
          -- Event Type
          'ROLL', 
          -- Event Description
          'Repointing Maneuver',
          -- Starting Date and Time of Event
          '1996/11/12 13:14:50.000',
          -- Ending Date and Time of Event
          '1996/11/12 13:17:22.000',
          -- Starting Y Position of Event 
          NULL,
          -- Starting Z Position of Event
          NULL,
          -- Ending Y Position of Event
          NULL,
          -- Ending Z Position of Event
          NULL,
          -- Origin of Event Report
          'BIG BEAR',
          -- Comments Available
          'Y',
          -- Date and Time Record was Last Updated
          '1995/04/12 11:02:00.000'
         )
       ;

-- Add rows to the Comment Events Database

-- Add comment number 1 into comment_events table.
INSERT INTO comment_events 	
         (comm_no,
          event_no,
          comment_text,
          date_mod)
       VALUES
         (
          -- Comment Number
          1,
          -- Event Number 
          1,
          -- Comment Text
          'This flare cause both the SUMMER and CDS instruments to be ' || 
          'shut down.',
          -- Date and Time record was last updated
          '1995/04/19 13:14:00.000'
         )
       ;

-- Add comment number 2 into comment_events table.
INSERT INTO comment_events 	
         (comm_no,
          event_no,
          comment_text,
          date_mod)
       VALUES
         (
          -- Comment Number
          2,
          -- Event Number 
          1,
          -- Comment Text
          'Some data from the LASCO instrument may have been corrupted due' ||
          ' to this event.',
          -- Date and Time record was last updated
          '1995/04/19 13:16:00.000'
         )
       ;

-- Add comment number 3 into comment_events table.
INSERT INTO comment_events 	
         (comm_no,
          event_no,
          comment_text,
          date_mod)
       VALUES
         (
          -- Comment Number
          3,
          -- Event Number 
          5,
          -- Comment Text
          'All instruments were shut down during this maneuver.',
          -- Date and Time record was last updated
          '1995/04/19 13:19:00.000'
         )
       ;

-- Commit Database Update
COMMIT ;
