 /*  the table for storing the configuration for 
    1) implement operarting range details
    2) gear ordder details  */
  
 drop table IF exists fw_ods.fw_ods_config_parameters ;
 
  create table fw_ods.fw_ods_config_parameters 
      ( syspk serial not null,
      client_id fw_ods.fw_num_dimid not null,
      function_id fw_ods.fw_num_dimid not null,
      param_group fw_ods.fw_text,
      param_name fw_ods.fw_text,
      vn1 fw_ods.fw_num_dimid,
      vn2 fw_ods.fw_num_dimid,
      vn3 fw_ods.fw_num_dimid,
      vm1 fw_ods.fw_num_metric,
      vm2 fw_ods.fw_num_metric,
      vm3 fw_ods.fw_num_metric,
      vt1 fw_ods.fw_text,
      vt2 fw_ods.fw_text,
      vt3 fw_ods.fw_text,
      comments fw_ods.fw_text,
      created_by fw_ods.fw_text default session_user,
      create_timestamp fw_ods.fw_timestamp default now(),
      updated_by fw_ods.fw_text null,
      update_timestamp fw_ods.fw_timestamp null);
	  
	  
	  INSERT INTO fw_ods.fw_ods_config_parameters (client_id,function_id,param_group,param_name,vn1,vn2,vn3,vm1,vm2,vm3,vt1,vt2,vt3,"comments",created_by,create_timestamp,updated_by,update_timestamp) VALUES 
(20,1,'Gear Order','A1',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','A2',2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','A3',3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','A4',4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','A5',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','B1',6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','B2',7,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','B3',8,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','B4',9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','B5',10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
;
INSERT INTO fw_ods.fw_ods_config_parameters (client_id,function_id,param_group,param_name,vn1,vn2,vn3,vm1,vm2,vm3,vt1,vt2,vt3,"comments",created_by,create_timestamp,updated_by,update_timestamp) VALUES 
(20,1,'Gear Order','C1',11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','C2',12,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','C3',13,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','C4',14,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','C5',15,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','D1',16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','D2',17,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','D3',18,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','D4',19,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','D5',20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
;
INSERT INTO fw_ods.fw_ods_config_parameters (client_id,function_id,param_group,param_name,vn1,vn2,vn3,vm1,vm2,vm3,vt1,vt2,vt3,"comments",created_by,create_timestamp,updated_by,update_timestamp) VALUES 
(20,1,'Gear Order','L1',21,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','L2',22,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','L3',23,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','L4',24,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','L5',25,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','M1',26,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','M2',27,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','M3',28,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','M4',29,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','M5',30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
;
INSERT INTO fw_ods.fw_ods_config_parameters (client_id,function_id,param_group,param_name,vn1,vn2,vn3,vm1,vm2,vm3,vt1,vt2,vt3,"comments",created_by,create_timestamp,updated_by,update_timestamp) VALUES 
(20,1,'Gear Order','H1',31,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','H2',32,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','H3',33,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','H4',34,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Gear Order','H5',35,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:09:21.695',NULL,NULL)
,(20,1,'Implement RPM Range','Plough',1300,1800,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:12:36.945',NULL,NULL)
,(20,1,'Implement RPM Range','Cultivator',1700,2100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:12:36.945',NULL,NULL)
,(20,1,'Implement RPM Range','Harrow',1700,2100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:12:36.945',NULL,NULL)
,(20,1,'Implement RPM Range','Rotavator',2000,2100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:12:36.945',NULL,NULL)
,(20,1,'Implement RPM Range','Haulage',2000,2300,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'postgres','2021-08-22 10:12:36.945',NULL,NULL)
;
	  
	
      