podoc:view_lens_type_sql_view
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:view_lens_type_sql_view [2007/04/17 13:13] – Luud | podoc:view_lens_type_sql_view [2007/10/19 20:13] (current) – Luud | ||
---|---|---|---|
Line 11: | Line 11: | ||
=== Schema === | === Schema === | ||
- | < | + | < |
- | create view view_lens_type as select lens_type.identifier, | + | create view view_lens_type as select lens_type.identifier, |
- | manufacturer.name, | + | |
model, variation, s_min_aperture, | model, variation, s_min_aperture, | ||
- | s_min_focal_length, | + | s_min_focal_length, |
+ | exiftool_lens_id | ||
from lens_type, manufacturer, | from lens_type, manufacturer, | ||
| | ||
Line 39: | Line 39: | ||
* [[lens_type sql table|lens_type]] | * [[lens_type sql table|lens_type]] | ||
* [[manufacturer sql table|manufacturer]] | * [[manufacturer sql table|manufacturer]] | ||
- | |||
- | === Related indexes === | ||
- | |||
- | === Related functions === | ||
- | |||
- | === Related sequences === | ||
=== History === | === History === | ||
Line 60: | Line 54: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | < | + | < |
create view view_lens_type as | create view view_lens_type as | ||
select lens_type.identifier, | select lens_type.identifier, | ||
Line 78: | Line 72: | ||
= Version 2.32 = | = Version 2.32 = | ||
- | < | + | < |
-- Convert focal length from a varchar to an integer | -- Convert focal length from a varchar to an integer | ||
-- and aperture to a numeric type | -- and aperture to a numeric type | ||
Line 88: | Line 82: | ||
model, variation, s_min_aperture, | model, variation, s_min_aperture, | ||
s_min_focal_length, | s_min_focal_length, | ||
+ | from lens_type, manufacturer, | ||
+ | | ||
+ | from focal_length) as t_min_focal_length, | ||
+ | | ||
+ | from focal_length) as t_max_focal_length, | ||
+ | | ||
+ | aperture) as t_min_aperture, | ||
+ | | ||
+ | aperture) as t_max_aperture | ||
+ | where lens_type.manufacturer = manufacturer.identifier | ||
+ | and lens_type.min_focal_length = t_min_focal_length.identifier | ||
+ | and lens_type.max_focal_length = t_max_focal_length.identifier | ||
+ | and lens_type.min_aperture = t_min_aperture.identifier | ||
+ | and lens_type.max_aperture = t_max_aperture.identifier | ||
+ | order by manufacturer.name, | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | drop view view_lens_type; | ||
+ | |||
+ | create view view_lens_type as select lens_type.identifier, | ||
+ | model, variation, s_min_aperture, | ||
+ | s_min_focal_length, | ||
+ | exiftool_lens_id | ||
from lens_type, manufacturer, | from lens_type, manufacturer, | ||
| |
podoc/view_lens_type_sql_view.1176815616.txt.gz · Last modified: 2007/04/17 13:13 by Luud