Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Compare records between table Expand / Collapse
Author
Message
Posted Friday, September 18, 2009 1:38 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, August 30, 2013 1:54 AM
Points: 39, Visits: 118
I have one table test where million of records.
The table is not having any primary column.
The columns in table are positionid,ID1,ID2,Event,DrC,Acct,Amount,
valuedate, and Ccyt.
There are lot of records for valuedate= 20070731 and 20070724. There are other valuedate also.
But i want to fetch all the different records except valuedate for these two value date (20070731 and 20070724) in table.

Please provide me query. I am using sql server 2005.
Post #790151
Posted Friday, September 18, 2009 1:53 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 3:16 AM
Points: 4,930, Visits: 8,744
SELECT *
FROM [table test where million of records]
WHERE valuedate <> '20070731'
and valuedate <> '20070724'



--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #790158
Posted Friday, September 18, 2009 2:05 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 3:16 AM
Points: 4,930, Visits: 8,744
SELECT *
FROM [table test where million of records]
WHERE valuedate <> '20070731'
and valuedate <> '20070724'



--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #790161
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse