methods

Olivier vidal_olivier at yahoo.fr
Fri Jan 21 18:53:39 CST 2005


>
>
> 3) what is your task?
>     give us example of what you need ?

I have a table of ZIP-Citys :

   zip=new vstring("zip",5,EVflag.fIndexed)
   city=new vvarChar("city",100,EVflag.fIndexed+EVflag.findexByWords)
   CityIdx=new vvarChar("cityIdx",100,EVflag.fIndexed,"city")

and a table of streets :

   street=new vvarChar("street",100,EVflag.fIndexed+EVflag.fIndexByWords)
   streetIdx=new vvarChar("streetIdx",25,EVflag.findexed,"street")

Every street belongs to a couple zip / city :

link_Street_ZipCity=new vbinaryLink("link_Street_ZipCity", streetTb,  
ZipCityTb, EVlinkType.kOne, EVlinkType.kMany)

In a couple zip-city, it cannot have two identical streets there.
I cannot use of "unique" flag on the column " street " because it can  
have several streets with the same name but in different cities there.

I thus added in my table "streets", a column " Zip+city+street " which  
contains RecId of the couple zip / city + the name of the street.
This column has the "unique" flag. OK

ZipCityStreet=new  
vvarChar("zipCityStreet",110,EVflag.fIndexed+EVflag.fUnique)

But it takes many place. many. (+ utf16..)
If I could make a method, in my table streets :

ZipCityStreet=new  
vvarChar("zipCityStreet",110,EVflag.fIndexed+EVflag.fUnique,"CONCAT(zipC 
ity.RECID,street)")

I shall have "only" indexes. Many place would be saved.

thank you

olivier



More information about the Valentina-beta mailing list