Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Different server
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00391550
Message ID:
00391575
Views:
9
>>Hi All,
>>I have 2 servers Name "ASHI" and "JAIN". both have same database name "ORS". I want to find out how many records different in a table name "app". what is the sql query to find out the number of records different in this table. Any Clue???
>>
>>Thanx,
>>....ashish
>
>SQL Server tables are identified by Server.Owner.Table. What determines if records are different?
>
>The following will check for records that do not exist in JAIN but do exist in ASHI:
select appjain.* from jain.dbo.app appjain where appjain.key 
   not in (select appashi.key from ashi.dbo.app appashi)

Forgot to add the alias at the end of the subquery.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform