-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kumaran | #1013 | Added 10 more users for last batch of training
- Loading branch information
Kumaran Venkataraman
committed
Jun 11, 2014
1 parent
96addcc
commit f0f1c4b
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...urces/migrations/anmReport/V1_0_23__Adding_Ten_More_User_Data_For_Last_Batch_Training.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('trainer11'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('trainer12'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('trainer13'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('trainer14'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('trainer15'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user41'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user42'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user43'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user44'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user45'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user46'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user47'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user48'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user49'); | ||
|
||
INSERT INTO anm_report.dim_anm (anmIdentifier) VALUES ('user50'); |
35 changes: 35 additions & 0 deletions
35
...rations/serviceProvided/V1_0_35__Adding_Ten_More_User_Data_For_Last_Batch_of_Training.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user41', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User41', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user41'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user42', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User42', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user42'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user43', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User43', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user43'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user44', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User44', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user44'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user45', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User45', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user45'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user46', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User46', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user46'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user47', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User47', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user47'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user48', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User48', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user48'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user49', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User49', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user49'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'user50', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'User50', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='user50'); | ||
|
||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user41'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user41')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user42'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user42')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user43'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user43')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user44'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user44')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user45'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user45')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user46'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user46')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user47'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user47')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user48'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user48')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user49'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user49')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='user50'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='user50')); | ||
|
||
|
||
--Trainer data | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'trainer11', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'Trainer11', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='trainer11'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'trainer12', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'Trainer12', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='trainer12'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'trainer13', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'Trainer13', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='trainer13'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'trainer14', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'Trainer14', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='trainer14'); | ||
INSERT INTO report.dim_anm (anmIdentifier, phc, name, subcenter) SELECT 'trainer15', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='bherya'), 'Trainer15', 'munjanahalli' WHERE NOT EXISTS (SELECT dim_anm FROM report.dim_anm WHERE anmIdentifier='trainer15'); | ||
|
||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer11'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer11')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer12'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer12')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer13'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer13')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer14'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer14')); | ||
INSERT INTO report.dim_service_provider (service_provider, type) SELECT (SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer15'), (SELECT ID FROM report.dim_service_provider_type WHERE type='ANM') WHERE NOT EXISTS (SELECT service_provider FROM report.dim_service_provider WHERE service_provider=(SELECT ID FROM report.dim_anm WHERE anmIdentifier='trainer15')); |