Request SQL

Thierry Nauze huancaya at wanadoo.fr
Tue Jul 6 05:46:53 CDT 2004


Le 5 juil. 04, à 18:06, Ruslan Zasukhin a écrit :

> On 7/5/04 4:59 PM, "Thierry Nauze" <huancaya at wanadoo.fr> wrote:
>
> Hi Thierry ,
>
>> I have a table : relations
>> with fields : id, idIndividu,idRelation,idSource ...
>>
>> How to select the records where idIndividu=idRelation
>>
>> "SELECT id,idSource FROM relations WHERE idIndividu=idRelation"  
>> select
>> ALL records.
>>
>> Where is the error ?
>
> Just not implemented in Valentina 1.x
>
> You should to use workaround:
>     create BaseObject method field with formula "idIndividu=idRelation"

Whith :
  boRelations
  name = "relations"
   id = new vUMedium("id",kV_Unique)
   idIndividu = new vUMedium("idIndividu")
   idRelation = new vUMedium("idRelation")

   autoRelation=new vUMedium("autorelation")
   autoRelation.setMethod("idIndividu-idRelation")

My request :
"SELECT id,idSource,idIndividu FROM relations WHERE id>0 AND 
autorelation=0"
works


But,

boRelations
  name = "relations"
   id = new vUMedium("id",kV_Unique)
   idIndividu = new vUMedium("idIndividu")
   idRelation = new vUMedium("idRelation")

   autoRelation=new vBoolean("autorelation")
   autoRelation.setMethod("idIndividu=idRelation")

And the request :
"SELECT id,idSource,idIndividu FROM relations WHERE id>0 AND 
autorelation*"
don't works

autoRelation, autoRelation=true ...   Many expression were tried.
What is then cood ?

Regards,

--
Thierry Nauze			Saint-Denis de la Réunion



More information about the Valentina mailing list