-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: PuneetT
Message 7 in Discussion

Hi,   Try out the following query    
Select Count(*) - (Select Count(*) From NewTab1) 
>From NewTab1 A INNER JOIN NewTab2 B 
On convert(varchar(30), A.NewTabCol1) + convert(varchar(30), A.NewTabCol2) +  
convert(varchar(30), A.NewTabCol3) +  
convert(varchar(30), A.NewTabCol4) +  
convert(varchar(30), A.NewTabCol5) =  
convert(varchar(30), B.NewTabCol1) + convert(varchar(30), B.NewTabCol2) +  
convert(varchar(30), B.NewTabCol3) +  
convert(varchar(30), B.NewTabCol4) +  
convert(varchar(30), B.NewTabCol5) 
If it returns you 0 then this means that you have both the tables identical otherwise 
not. This is in terms of data only. 
  
This solution assumes that design of both the tables is exactly the same. For the 
purpose of this sample code, following is the structure of these queries:  
Create TABLE NewTab1 ( 
NewTabCol1 varchar(10) PRIMARY KEY not NULL, 
NewTabCol2 int not NULL, 
NewTabCol3 varchar(20) NULL, 
NewTabCol4 varchar(30) Not NULL, 
NewTabCol5 datetime not NULL 
) 
  
  
Regards, 
Puneet Taneja

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to