-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from NaturalSolutions/development
Up version Master with development branch
- Loading branch information
Showing
279 changed files
with
13,764 additions
and
18,178 deletions.
There are no files selected for viewing
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
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
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
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
47 changes: 47 additions & 0 deletions
47
Back/database/Pipe/DB_Mother/095_Add_precision_to_VallindivLocation.txt
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,47 @@ | ||
ALTER View [dbo].[allIndivLocationWithStations] as | ||
(SELECT convert(varchar,l.[ID]) as ID | ||
,[LAT] | ||
,[LON] | ||
,[Date] | ||
,[type_] | ||
,r.Region as region | ||
,l.FK_Individual as FK_Individual | ||
,NuLL as fieldActivity_Name | ||
,l.Precision as precision | ||
FROM [Individual_Location] l | ||
LEFT JOIN Region r on r.ID = l.FK_Region | ||
|
||
UNion ALL | ||
SELECT 'sta_'+convert(varchar,o.FK_Station) as ID | ||
,[LAT] | ||
,[LON] | ||
,StationDate as Date | ||
,'station' as type_ | ||
,r.Region as region | ||
,o.FK_Individual as FK_Individual | ||
,fa.Name as fieldActivity_Name | ||
,s.precision | ||
|
||
FROM Station s | ||
LEFT JOIN Region r on r.ID = s.FK_Region | ||
LEFT JOIN fieldActivity fa on fa.ID = s.fieldActivityId | ||
JOIN Observation o ON o.FK_Station = s.ID | ||
group by o.FK_Station | ||
,[LAT] | ||
,[LON] | ||
,StationDate | ||
,r.Region | ||
,o.FK_Individual | ||
,fa.Name | ||
,s.precision | ||
) | ||
|
||
|
||
GO | ||
|
||
|
||
|
||
INSERT INTO [dbo].[TVersion] (TVer_FileName,TVer_Date,TVer_DbName) VALUES ('95_Add_precision_to_VallindivLocation',GETDATE(),(SELECT db_name())) | ||
|
||
|
||
GO |
Oops, something went wrong.