Subject | Re: [firebird-support] avoiding duplicates |
---|---|
Author | Marvin Cook |
Post date | 2005-07-11T21:47:53Z |
Make a table with the acceptable names and use a lookup for the user input.
Otherwise, you can not guarantee spelling or abbreviations.
Marv
Otherwise, you can not guarantee spelling or abbreviations.
Marv
On 7/11/05, Uwe Grauer <mailinglists@...> wrote:
>
> Max Thorne wrote:
>
> >
> > Hi,
> >
> > how can I prevent a user from inserting duplicates in a table? For
> > example I have table "company" with field "name" and a unique index
> > for this field. However, a user can insert values like "Diesel
> > Co.","DIESEL CO.", "diesel co.". Same company, different entries.
> Thanks!
> >
> > Max
>
> Hi Max,
>
> put a new column name_upr to your table. Populate this column with a
> trigger which uses the upper value
> for the new column. Put a unique index on column name_upr.
>
> Uwe
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> ------------------------------
> YAHOO! GROUPS LINKS
>
>
> - Visit your group "firebird-support<http://groups.yahoo.com/group/firebird-support>"
> on the web.
> - To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com<firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
> - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------
>
[Non-text portions of this message have been removed]