检查数据输入表单中的重复地址 [英] Check for duplicate addresses from a data entry form

查看:88
本文介绍了检查数据输入表单中的重复地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据输入表单,列出了建筑物销售的详细信息。我知道建筑物可以卖不止一次所以我需要允许重复的地址。但是,偶尔同一次销售将不止一次进入。我有代码检查地址是否重复,并将用户带到现有记录以验证信息,这是正常的。但随着我向数据库中添加更多销售额,可能会输入特定房产的多个销售额。我现在发现不仅要检查重复销售,还要有多个要比较。我不确定这是否可行,或者我是否应该添加其他标准,例如销售日期以查找现有销售。合理?以下是我到目前为止的代码,适用于一条记录:

展开 | 选择 | Wrap < span class =codeDivider> | 行号

解决方案

< blockquote>最好根据规范化重新设计表格。然后你就不会有这个问题了,一个基于PK的简单查询就可以解决你的问题。


欢呼,


我的表是规范化的而不是确定基于主键的查询。示例?


您能否告诉我们桌面设计。


欢呼,


I have a data entry form that lists the details of building sales. I know a building can sell more than once so I need to allow duplicate addresses. However, occasionally the same sale will get entered more than once. I have code that checks if the address is a duplicate and takes the user to the existing record to verify the information and this works fine. But as I add more sales into the database, the possibility of more than one sale for a particular property being entered. I now find the need to not only check for duplicate sales but there is more than one to compare to. I''m not sure if this is possible or if I should add another criteria such as sales date to find an existing sale. Make sense? the following is the code I have thus far and works for one record:

Expand|Select|Wrap|Line Numbers

解决方案

You are better off re-designing your tables based on normalization. Then you would not have this problem and a simple query based on the PK would solve your problems.

cheers,


My table is normalized not sure what you have in mind basing a query on the primary key. Example?


Could you please show us the table design.

cheers,


这篇关于检查数据输入表单中的重复地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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