Perform lookup in another table and produce selected results
<p>I am interested in "rendering" results of a <code>select</code> as a lookup in another table.</p>

<p>Given something like:</p>

<pre><code>select [timestamp],[client_op]
from recording.dbo.events
</code></pre>

<p><code>client_op</code> has a translation in a table <code>recording.dbo.EventTypes</code> and can be directly correlated to the column <code>OpCode</code> in <code>recording.dbo.EventTypes</code>.  </p>

<p>I would like to return the value of the <code>EventName</code> which is contained in <code>recording.dbo.EventTypes</code> by using per <code>client_op</code> along with other results from <code>recording.dbo.events</code> only.  I basically want a straight replacement for <code>recording.dbo.events.client_op</code> with <code>recording.dbo.EventTypes.EventName</code>.</p>

<p>I've done research on <code>INNER JOIN</code> but am unable to figure out how to perform this type of lookup.</p>

<hr>

<p>Here is the resolution as per the accepted answer below:</p>

<pre><code>select C.[timestamp],C.[filer_id],C.[user_sid],C.[DirPath],C.[FileName],E.EventName
from varonis.dbo.cifs_events_2 C
join VrnsDomainDB.dbo.EventTypes E on C.[client_op]=E.OpCode
where C.[timestamp] &gt;= dateadd( minute, -25, getdate() ) and ( charindex('.doc',C.[FileName]) &gt; 0 or charindex('.xls',C.[FileName]) &gt; 0 or charindex('.ppt',C.[FileName]) &gt; 0 or charindex('.ont',C.[FileName]) &gt; 0 ) order by C.USER_SID
</code></pre>