So, if there is a JobID = 1 in Table1 and 2 JobID = 1 in Table2, I need 3 rows. The one from Table1 and the 2 from Table2
I'm having a hard time even explaining this, so hopefully this makes some sense. Well there are two possible solutions to this depending on what you really need. The first, more common, solution is an join. You would join the two tables with a join and this would get you two rows each with the id from one table and an id from the second table. You would use an inner or outer join depending on how you want to handle records that do not have IDs in both tables. The second, if you really need these as separate records, is a union. You would write one select clause and union it to a second select clause. This would give you a record set with three records each with an id from either table one or table two. -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA --------- | 1 | | --------- Binary Soduko | | | --------- "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2574 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
