|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
AW: AW: question about ALPHA and SOUNDEX function
From: Josu (gollumsss
gmail.com)
Date: Tue Feb 08 2005 - 02:52:50 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hallo,
> -----Ursprüngliche Nachricht-----
> Von: Josu [mailto:gollumsss
gmail.com]
> Gesendet: Montag, 7. Februar 2005 16:52
> An: Zabach, Elke
> Betreff: Re: AW: question about ALPHA and SOUNDEX function
>
> ALPHA issue:
>
> We have an unicode database but the columns where we apply the ALPHA
> function are in ASCII so there is no error (we already noticed that
> MAPCHAR only apply to ASCII) but in .....
>
> CREATE TABLE "GIS_PROVINCIA"
> (
> "IDGIS_PROVINCIA" Integer NOT NULL DEFAULT
> SERIAL (1),
> "CPAIS" Integer,
> "CPRO" Integer,
> "PROVINCIA" Varchar (50) ASCII,
> "BUSCAR" Varchar (50) ASCII,
> PRIMARY KEY ("IDGIS_PROVINCIA")
> )
>
> when we do ....
>
> select alpha(provincia), provincia from gis_provincia where
> alpha(provincia) = alpha('bizkaia')
>
> error ......
>
> Integrity constraint violation;-8006 POS(87) Data types must be compatible
>
> Perhaps it can be fixed by creating a procedure with a forced input
> string ascii parameter?
You mean something like the EXISTING function ASCII ?
http://dev.mysql.com/doc/maxdb/en/5e/0a41edba9d11d2a97100a0c9449261/frameset.htm
--> (provincia) = alpha(ascii('bizkaia'))
Elke
SAP Labs Berlin
>
> Thanks,
> Josu.
>
> On Mon, 7 Feb 2005 14:27:20 +0100, Zabach, Elke <elke.zabach
sap.com>
> wrote:
> > Josu wrote:
> > >
> > > Hi,
> > >
> > > we are trying to implement a search method to grab the best results
> > > and the most with a keyword given (keyword=a country, a province, a
> > > city ....)
> > >
> > > Until now we don't know how to do ALPHA queries, we try:
> > >
> > > select name,alpha(name) from countries where alpha(name) like/=
> > > alpha(keyword)
> > >
> > > It results in an error with the datetype in alpha(->keyword<-), it
> > > seems that it doesnt accept literals¿?
> >
> > Some aspects have to be taken into account:
> > 1. ALPHA(x, length) means the same as
> UPPER(MAPCHAR(x,length,DEFAULTMAP))
> > You really need MAPCHAR AND UPPER? UPPER alone is not convenient?
> > 2. Which error is returned together with literals?
> > 2. Do you use a UNICODE-database, meaning that string-literals are
> handled as UNICODE, not being accepted by DEFAULTMAP, which was defined
> for ASCII, meaning that ALPHA (<some unicode-data>) is of no use.
> >
> > >
> > > And other issue ..... we haven't found what is the soundex function
> > > used and how to customize it because we are spanish speakers! We try
> > > to use sounds and soundex to accomplish:
> > >
> > > Input "Niza" (Nice in spanish) -> Give results that sounds like Niza
> > >
> > > The function returns a lot of not logical rows for a spanish person
> > > and also good ones.
> > >
> >
> > SOUNDEX is written for german speakers, no chance to switch to another
> langage and their differences between written and spoken words.
> >
> > > And last, there is some kind of function as in SQL server to compare
> > > SOUNDEX with a error margin? Explanation:
> > >
> > > starting soundex=A456 -> give results that SOUNDS A4*, or A45* or A456
> >
> > There is no error margin behaviour available in MaxDB. LIKE compares the
> strings, not the meaning of mapchar/alpha-results.
> >
> > Elke
> > SAP Labs Berlin
> > >
> > > Hope anyone can help,
> > > Josu.
> > >
> > > --
> > > "No es lo mismo ensamblar las piezas de un puzzle a fin de formar un
> > > cuadro,
> > > que coger un cuadro y hacerlo añicos, al objeto de crear un puzzle"
> > > Julio Camba, Artículos sobre la II República
> > >
> > > --
> > > MaxDB Discussion Mailing List
> > > For list archives: http://lists.mysql.com/maxdb
> > > To unsubscribe:
> http://lists.mysql.com/maxdb?unsub=elke.zabach
sap.com
> >
> >
>
>
> --
> "No es lo mismo ensamblar las piezas de un puzzle a fin de formar un
> cuadro,
> que coger un cuadro y hacerlo añicos, al objeto de crear un puzzle"
> Julio Camba, Artículos sobre la II República
--
"No es lo mismo ensamblar las piezas de un puzzle a fin de formar un cuadro,
que coger un cuadro y hacerlo añicos, al objeto de crear un puzzle"
Julio Camba, Artículos sobre la II República
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]