mbari-org / vars-annotation

Video Annotation Application for MBARI's Media Management (M3) software stack
https://docs.mbari.org/vars-annotation/
Apache License 2.0
16 stars 6 forks source link

Need help with SQL #90

Closed lindakuhnz closed 6 years ago

lindakuhnz commented 6 years ago

For concept siphon (old database) over 3800 m depth, add association “part-of” “Octacnemidae sp. 1 I’m doing something wrong here. . . please help construction most efficient code for me to run in SQL database.

WHERE [dbo].[PhysicalData].[Depth] Over '%3800%' AND ConceptName ='siphon' ) UPDATE Annotations SET LinkName = 'part-of' where conceptname = 'siphon'

WHERE [dbo].[PhysicalData].[Depth] Over '%3800%' AND ConceptName ='siphon' ) UPDATE Annotations SET ToConcept = 'self' where conceptname = 'siphon'

WHERE [dbo].[PhysicalData].[Depth] Over '%3800%' AND ConceptName ='siphon' ) UPDATE Annotations SET LinkValue = 'Octacnemidae sp. 1' where conceptname = ‘siphon'

lonnylundsten commented 6 years ago

This is what I would use for the VARS db: UPDATE Annotations SET LinkName = 'part-of' WHERE conceptname = 'siphon' AND depth >= 3800; UPDATE Annotations SET ToConcept = 'marine organism' WHERE conceptname = 'siphon' AND depth >= 3800; UPDATE Annotations SET LinkValue = 'Octacnemidae sp. 1' WHERE conceptname = 'siphon' AND depth >= 3800

lonnylundsten commented 6 years ago

And this should work for m3_annotations: UPDATE Annotations SET link_name = 'part-of' WHERE concept = 'siphon' AND depth_meters >= 3800; UPDATE Annotations SET to_concept = 'marine organism' WHERE concept = 'siphon' AND depth_meters >= 3800; UPDATE Annotations SET link_value = 'Octacnemidae sp. 1' WHERE concept = 'siphon' AND depth_meters >= 3800

lindakuhnz commented 6 years ago

Thanks!