Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL 2008 R2 - how to show records based on a sub-select (2 fields)

$
0
0

Hi,

I have one table as following:

TBL_LOGS_HMAIL
#############
EventType (nvarchar(5),null)
EventID (int, null)
TransactionID (int, null)
TimeStamp (datetime, null)
IPAdress (varchar(255), null)
Details (ntext, null) 


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

Using the query below, I´m able to get the combination of all EventID and TransactionID

select EventID, TransactionID from [TBL_LOGS_HMAIL]
where
(
Details LIKE N'SENT: MAIL FROM:<john@domain.com.br>'
)

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

How to show all records from that table but restricted for the combination above??


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>