Reputation: 1
I'm trying to get one table from two tables but I need the records to be synchronized by the same date without the time
select *
from Transactions , SellerIPLogins
where Transactions.SellerId =SellerIPLogins.SellerId
and Transactions.SellerId=3141 and Transactions.Payment>1
and **Transactions.Date=SellerIPLogins.Date**
order by Transactions.Date desc
Upvotes: 0
Views: 39
Reputation: 4908
Use Convert method to convert datetime to date:
select *
from Transactions , SellerIPLogins
where Transactions.SellerId =SellerIPLogins.SellerId
and Transactions.SellerId=3141 and Transactions.Payment>1
and Convert(date,Transactions.Date)=Convert(date,SellerIPLogins.Date)
order by Transactions.Date desc
Upvotes: 1