This kind of tuple query is always going to give you a flat result set, just
like a many-one SQL query, so I think you're going to find it difficult
natively in iTQL to get the output you are looking for.

You could consider running multiple queries, and merging the output (eg in
XSLT)

Or you could consider running one query, sort the columns, and then use XSLT
to transform that into a more structured set of data.

Eg 
<collection>
        <member>
                <subject>
                <subject>
        <member>
                <subject>
                <subject>

What I'd ask is - what are you going to do with the output?  What do you
want to achieve?  Understanding that might give insight into the best
solution.

-----Original Message-----
From: arne anka [mailto:[EMAIL PROTECTED] 
Sent: 13 November 2008 10:59
To: Steve Bayliss
Cc: fedora-commons-users
Subject: Re: [Fedora-commons-users] iTQL: duplicates in risearch


> I'm not sure that you have duplicates - you have
>
> - "collection Aigle-21" and "Collection Aigle21" for collTitle
> - "teuchos collection Aigle-21" and "Teuchos Collection Aigle-21" for 
> collDesc
>
> ie, different capitalisation.

thanks, never noticed that -- seems i somehow managed to confuse fedora  
while testing my collection objects (the collection object in question  
existed _twice_ below $FEDORA_HOME/data/objects, no idea how this could  
happen).


> If you make both these the same, you should end up with four rows -- 
> but multiplying by 2x2 for these variants gives you the 16 rows you 
> returned.
>
> You might be expecting only two results rows - but you seem to have 
> two different subjects for each member also, so you'll get a separate 
> row for each subject.

yes, and it might become even more if someone adds translations.


> By the way, it's easier to spot this sort of thing if you sort, ie add 
> an order by clause, eg
>
> order by $collTitle $collDesc $memberID $member $memberTitle
> $memberSubject;
>
> that will make it a lot more obvious.

yes, i was looking for some documentation how to formulate queries --  
frinst how to merge the different subjects into one field and to do  
ordering.
any links available?


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to