-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
stata_code/data_extraction_processing/extraction/cams_data_dump.do
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,34 @@ | ||
#delimit ; | ||
|
||
global firstyr 2000; | ||
global lastyr = 2004; | ||
clear; | ||
|
||
/* landings */ | ||
/* leave off schema for TTS */ | ||
odbc load, exec("select * from cams_land cl | ||
where year>=$firstyr and year<=$lastyr;") $myNEFSC_USERS_conn; | ||
|
||
save $data_main/cams_land_$today_date_string.dta, replace; | ||
export delimited using $data_main/cams_land_$today_date_string.csv, replace; | ||
|
||
|
||
clear; | ||
/*subtrip */ | ||
odbc load, exec("select * from cams_subtrip cst | ||
where year>=$firstyr and year<=$lastyr;") $myNEFSC_USERS_conn; | ||
|
||
save $data_main/cams_subtrip_$today_date_string.dta, replace; | ||
|
||
export delimited using $data_main/cams_subtrip_$today_date_string.csv, replace; | ||
|
||
|
||
|
||
|
||
|
||
/* orphan subtrip */ | ||
clear; | ||
odbc load, exec("select * from CAMS_VTR_ORPHANS_SUBTRIP where year>=$firstyr and year<=$lastyr;") $myNEFSC_USERS_conn; | ||
|
||
save $data_main/cams_orphan_subtrip_$today_date_string.dta, replace; | ||
export delimited using $data_main/cams_orphan_subtrip_$today_date_string.csv, replace; |