Using below query we can compare two table two (Placed in two different database)
select * from DB1Table1 where ID not in (select DBNAME2.dbo.DB2Table1.ID from DBNAME2.dbo.DB2Table1)
How to format amount in SQL Server using query?
select Convert(varchar,Convert(money,15000),1)
How to convert custom date format using Convert in SQL Server?
select Convert(varchar(10),getdate(),102)
select * from DB1Table1 where ID not in (select DBNAME2.dbo.DB2Table1.ID from DBNAME2.dbo.DB2Table1)
How to format amount in SQL Server using query?
select Convert(varchar,Convert(money,15000),1)
How to convert custom date format using Convert in SQL Server?
select Convert(varchar(10),getdate(),102)
101 - mm/dd/yyyy
102 - yyyy.mm.dd
103 - dd/mm/yyyy
104 - dd.mm.yyyy
105 - dd-mm-yyyy
106 - dd mon yyyy
107 - Mon dd, yyyy
102 - yyyy.mm.dd
103 - dd/mm/yyyy
104 - dd.mm.yyyy
105 - dd-mm-yyyy
106 - dd mon yyyy
107 - Mon dd, yyyy
108 - HH:mm:ss
109 – MMM dd yyyy h:mm:ss:mssN ex: Aug 27 2011 3:40:15:577P
110 - mm-dd-yyyy
111 - yyyy/mm/dd
112 – yyyymmdd
111 - yyyy/mm/dd
112 – yyyymmdd
113 – dd MMM yyyy HH:mm:ss:mss ex: 27 Aug 2011 15:42:38:123
114 – HH:mm:ss:mss ex: 15:43:47:000