I have two tables and the following query:
table1
---------
table1Id(pk)
fromdate,
todate,
name,
link
table2
--------
table2Id(pk)
url
table1Id(fk)
SELECT @ITEM = table1Id FROM table1
WHERE
table1.FromDate <= @ToDate AND @FromDate <= table1.ToDate
select * from table2 where table1Id =@ITEM
Is it possible to select the other fields from Table1
as well?