Join Excel worksheet table to SQL server database table OR use SQL server database table in subquery

by Sep 30, 2016

Is it possible to join a worksheet table to a SQL server table or use a SQL server table in a subquery?

Example of what I would like to do, But don't know if it's possible OR correct syntax to use to make connection:
— Join
select asp.salespersonuid,, s.lastsalesdate
from [Assigned Salesperson].[ALLfrom] asp — worksheet
join dbo.ssdatabase.table — sql server
on asp.salespersonuid = s.salespersonuid

— SubQuery
select asp.salespersonuid,, asp.lastsalesdate
from [Assigned Salesperson].[ALLfrom] asp — worksheet
where exists( select null
from dbo.ssdatabase.table — sql server
where salespersonuid = asp.salespersonuid )