----- Original Message ---- From: Derek Watson <[EMAIL PROTECTED]> > > It seems like a simple concat (pg operator ||) would work in this case: > > > > SELECT COUNT(t1.a_id || t1.b_id) > > Ugh, I forgot the DISTINCT again: > > SELECT COUNT(DISTINCT t1.a_id || t1.b_id) > > But this is tested and works properly too.
So what happens when you concatenate the IDs '1', '12' and '11', '2'? I think you need a separator in there: SELECT COUNT(DISTINCT t1.a_id || '-' || t1.b_id) Cheers, Ovid -- Buy the book -- http://www.oreilly.com/catalog/perlhks/ Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object