[Vserve+V4RB] Weird concatenated fields behaviour in searches

Eric Ferrer wonderfef at noos.fr
Fri Dec 17 12:24:29 CST 2004


Hello all,

Maybe this is normal, but it looks weird to me:

I have these tables :

FAXES
    ID
    Subject
    ParentRecipientID
PEOPLE
    ID
    FirstName
    LastName
    AllNames METHOD( CONCAT(FirstName, ' ', UPPER(LastName)) )

Note that Faxes may not have a 'ParentRecipientID', where the recipient is
unknown (field is empty).

When I want to display a list of faxes :

SELECT Subject, ParentRecipientID, People.AllNames
FROM Faxes, People
WHERE Faxes.ParentRecipientID *= People.ID

Valentina always tries to fill 'AllNames' with a value, even if
ParentRecipientID is empty :

Untitled fax            PPL123      John SMITH     // this one is good
Untiltled fax 2                         John SMITH     // John again !
Untitled fax 3                          John SMITH     // argh ! Him again !
Untitled fax 4         PPL234      Mary GLUCK    // ok for this one
Untitled fax 5                          Mary GLUCK    // Mary again !

If the first found record has no ParentRecipientID, Valentina seems to "pick
up randomly" someone in the People table :

Untitled fax                             Alfred SCHOPF     // why him ?
Untiltled fax 2                         Alfred SCHOPF     // again !
Untitled fax 3                          Alfred SCHOPF     // again !
Untitled fax 4         PPL234      Mary GLUCK        // ok for this one
Untitled fax 5                          Mary GLUCK        // mary again !


If I test with this query :
SELECT Subject, ParentRecipientID,
            People.FirstName, People.LastName, People.AllNames
FROM Faxes, People
WHERE Faxes.ParentRecipientID *= People.ID

I get good results, except for "AllNames" field :

fax1                                     Alfred SCHOPF
fax2    PPL123   John Smith  John SMITH
fax3                                     John SMITH
fax4    PPL234  Mary Gluck  Mary GLUCK
fax5                                    Mary GLUCK
fax6                                    Mary GLUCK

Thanks in advance for your help
Eric




More information about the Valentina mailing list