Select * From TableName Where myDate Between (Select myFromDate,myTodate From AnotherTableName where id=3)
Select * From TableName Where myDate Between (Select myFromDate From AnotherTableName where id=3) and (Select myTodate From AnotherTableName where id=3)
DECLARE @FrDate Datetime DECLARE @ToDate Datetime Select @FrDate=myFromDate, @ToDate=myTodate From AnotherTableName where id=3 Select * From TableName Where myDate Between @FrDate AND @ToDate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)