>SELECT maintable.pk, > (select COUNT(*) from childtable1 where pk = maintable.pk) as a, > (select COUNT(*) from childtable2 where pk = maintable.pk) as b, > (select COUNT(*) from childtable3 where pk = maintable.pk) as c, > (select COUNT(*) from childtable4 where pk = maintable.pk) as d, > (select COUNT(*) from childtable5 where pk = maintable.pk) as e, > (select COUNT(*) from childtable6 where pk = maintable.pk) as f > from maintable > where maintable.pk = @lnPK >Thanks Sergey. This query is so much better and simpler than the tangled mess I was writing.