Reply to Getting closest matching values

Your name:

Reply:


Posted by Hennie on 10/01/19 11:40

I apologise if this is a stupid question, but I would appreciated any
help on this subject.

I want to create a view (VIEW_1 in example below) where I take numeric
values from a field in one table (DEPTH_FROM in TABLE_1) and find the
closest matching values from another field in another table (DEPTH_AT
in TABLE_2) - the higher matching value and the lower matching value.


TABLE_1
BH_ID DEPTH_FROM
B1 10.6
B1 14.2
B1 16.1
B1 17.0

TABLE_2
BH_ID DEPTH_AT
B1 9
B1 10
B1 11
B1 12
B1 13
B1 14
B1 15
B1 16
B1 17
B1 18

VIEW_1
BH_ID DEPTH_FROM DEPTH_LOWER DEPTH_HIGHER
B1 10.6 10
11
B1 14.2 14
15
B1 16.1 16
17
B1 17.0 17
17

Any assistance would be appreciated.

Regards,
Hennie

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация