Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 comparing 2 tables

Author  Topic 

raddy
Starting Member

12 Posts

Posted - 2008-07-21 : 09:53:04
I created a new table using left join from 2 tables. The new table now has a few more rows than the original table.
Any ideas on how I can find them? Tried UNION, but data's huge and server's acting up. Unfortunately.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-21 : 09:56:50
Thats maens you have one to many relationship existing between two tables involved. i.e more than one row is linked to single row of other table. Post some sample data from them and specify how you want output to be out of them.
Go to Top of Page

raddy
Starting Member

12 Posts

Posted - 2008-07-21 : 10:04:07
Right, that makes sense, 1-many relation and it is true of the data too. Thanks for replying.
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2008-07-21 : 10:08:26
Your question is vague...........

Please post your table definition(s) and query used.

I'm guessing you did something like


SELECT
a.[something]
, b.[something]
, ....
, ....
INTO
tablec
FROM
tablea a
LEFT JOIN tableb b ON <some relationship>


but without knowing what information we have to work with in tablec we can't help you.


-------------
Charlie
Go to Top of Page
   

- Advertisement -