I try to calculate the distance between two points (according to the latitude / longitude of those points in decimal format) I am
VBA code:
constable = 3.14159265358979 function distance (lat1, lon1, lat2, lon2) dim theta, district theta = lon1 - lon2 district = sin (deg2rad ( Because (deg2rad (lat2)) * because (deg2rad (lat2)) * sin (deg2rad (lat2)) * (deg2rad (lat1)) * because (deg2rad (lat2)) * because (=) district = acos (district) district = rad2deg (district) = (Dist * 60 * 1.1515) * 1.609344 and Function Function ACOS (RD) if ABS (RD) & lt; & Gt; 1 then acos = pi / 2 - ATN (red / Sqr (1 - red * red)) elseif red = -1 then end = exemplary acos if end function function deg2rad (degree) deg2rad = cdbl (degree * pi / 180) Function function rad2deg (rad) rad2deg = CDbl (rad * 180 / pi) termination function and I get an error Run-time error '94': invalid usage of tap in this line " Deg2rad = CDBL (dig * p / 180) ". I write a question:
select different ([band] .E_laip + ([band] .E_min * (1/60)) + ([band] .E_sec * (1/3600 )) As Band_E_dec, ([band2] .E_laip + ([band2] .E_min * (1/60)) + ([band2] .E_sec * (1/3600))) as Band2_E_dec, ([ Band] .N_laip + ([band] .nmmin * (1/60)) + ([band]]. NSEC * (1/3600) AS Band_N_Dek, ([Band 2]. N_laip + ([band2] .N_min * Band [2/2]) [Band2]. Band2_N_dec, [Band], band [Band__dec], [Band2_N_dec], [Band2_E_Dec]) As on [band] .Stotis = band2 band2 join .totis; Maybe someone has an idea? Thanks in advance.
If you use LEFT JOIN , allow you to nose in your JOIN ad tables When there is no matching line, I think you have at least one record in your band table, where band2 is located on stotis < There is no matching line on the / code> field Do one thing to find out:
from the band * join band2 on the left [band] .stotis = band2.Stotis ou band2.stotis is zero < / Code> If you get a hit then you have a reference data problem.
Your solution is either by using LEFT JOIN WHERE is not Band2.stotis or a INNER JOIN with only one criteria < / Code>, which will return matching lines only in both tables.
Comments
Post a Comment