创建临时列表以搜索位置 [英] Temp list created to search locations

查看:73
本文介绍了创建临时列表以搜索位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想比较飞行数据和燃料购买数据,并确保我们的飞机在燃料供应商所说的位置。


我有一张飞行数据表(飞行) ),一个供应商信息表(供应商)和一个燃料发票联合查询(Union Master Invoices)。 flight有列nNumber,arrDate和arrLocation。供应商具有VendorID和AirportID列。 UMI具有TransDate,VendorID和TailNumber列。 UMI通过VendorID上的连接获取它的位置(AirportID)。


以下代码是我需要的开始:

I want to compare flight data to fuel purchase data and make sure our planes were at the place the fuel vendor says they were.

I have one table of flight data (flight), one table of Vendor info (Vendors) and one union query of fuel invoices (Union Master Invoices). flight has columns nNumber, arrDate, and arrLocation. Vendors has columns VendorID and AirportID. UMI has columns TransDate, VendorID, and TailNumber. UMI gets it''s location (AirportID) from a join on VendorID.

The following code is a start towards what I need:

展开 < span class =codeDivider> | 选择 | Wrap | Line数字

推荐答案

kpfunf。


尝试替换此连接条件
Hi, kpfunf.

Try to replace this join criteria
展开 | Sele ct | Wrap | 行号


FishVal,

该标准有效, 谢谢。我正在研究这个问题,我看到了一个问题。我需要的是以下内容:

1.同一天两个地点之间是否匹配?

2.如果没有,两者之间是否匹配1天内的位置?

(将这两个分开的列是最好的,所以我可以单独调查)。


这有意义吗?我需要看看飞机是否在加油日期(TransDate)和位置(AirportID)的一天内到达机场(arrLocation)。因为每天有多个航班,每天到不同的地点,我需要更多的iif语句来检查是真是假(飞机在这3天的时间内是否有任何点?)。这导致我进入列表中。理念。只是加入东西会带来多行,并可能导致问题。有什么想法吗?
FishVal,
That criteria works, thanks. As I''m working on this, I''m seeing a problem. What I need is the following:
1. Is there a match between the two locations for the same day?
2. If not, is there a match between the two locations within 1 day?
(Having these two in seperate columns would be best, so I can investigate seperately).

Does this make sense? I need to see if the plane visited the airport (arrLocation) at all within a day of the fueling date (TransDate) and location (AirportID). Because there are multiple flights per day, and to different locations per day, I need more of an iif statement to check true or false (Was the plane there are any point over this 3 day span?). This lead me to the "in list" idea. Just joining things brings back multiple rows and can cause problems. Any thoughts?


Bump。


这篇关于创建临时列表以搜索位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆