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
 displaying only from one table

Author  Topic 

goligol
Posting Yak Master

128 Posts

Posted - 2011-07-14 : 09:26:43
Hi,

I have to tables A and B, I want to display the rows from B which exactly the same in A. But what my code does keep the records from B and add column for same records at A. I just want to display same records from B.

select *
from dev.xListOfChildrenOffile25 B

,dev.xListOfChildrentAlList A


where B.O = A.O
and B.D = A.D
and B.M = A.M
and B.C = A.C

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-07-14 : 09:29:16
quote:
Originally posted by goligol

Hi,

I have to tables A and B, I want to display the rows from B which exactly the same in A. But what my code does keep the records from B and add column for same records at A. I just want to display same records from B.

select B.*
from dev.xListOfChildrenOffile25 B

,dev.xListOfChildrentAlList A


where B.O = A.O
and B.D = A.D
and B.M = A.M
and B.C = A.C




No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

goligol
Posting Yak Master

128 Posts

Posted - 2011-07-14 : 09:30:51
Thank you thank you thank you.
Go to Top of Page
   

- Advertisement -