Concatenate fields from different tables.

This may be a stupid question, but for some reason I can’t remember or seem to be able to find if you can concatenate objects from two different tables into one object. It seems like there wouldn’t be a problem, however when I concatenate columnA.Table1 with columnB.Table2 I get a cartesian product on that object alone. The object at first had no where statement, but then I put one in there and it created two identical where statements in the SQL. I updated the object again and got a valid SQL statement with one where statment joining the two tables and I still get a Cartesian product. Does anyone have any suggestion or references to a previous entry on this?


wbuente (BOB member since 2004-06-21)

Not a Designer answer but it seems it really would be easier to do this concat in a report


scott copeland (BOB member since 2002-08-15)

Are your two tables joined in the universe? If you are using contexts does this join belong to at least one context?


Andreas :de: (BOB member since 2002-06-20)

The two tables are joined in the universe and there are no contexts setup. It is just a simple equi-join between the two tables.


wbuente (BOB member since 2004-06-21)

Not to doubt you, but I would double-check. If the tables are joined, you should not get a Cartesian product message.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

The tables are definitely joined. I have added the join in the Where statement of the object itself so that it uses the join. Otherwise the objects would return a SQL statement with no Where statement. I can send you the SQL if you would like.

SELECT
  (ohmemb.dbo.member_group_product_mbrgp.mbrgp_primary_sid)+
((ohmemb.dbo.member_mbr.mbr_gender_code) )
FROM
  ohmemb.dbo.member_mbr,
  ohmemb.dbo.member_group_product_mbrgp
WHERE
( ohmemb.dbo.member_group_product_mbrgp.mbrgp_member_eid = ohmemb.dbo.member_mbr.mbr_member_eid  )

wbuente (BOB member since 2004-06-21)