SQL Code in Tabular SQL
{
Declare @shortStartDate char(11), @shortEndDate char(11), @Station char(4), @Branch char(4)
Set @Station = (#prompt('Station')#)
Set @Branch = (#prompt('Branch')#)
Set @shortStartDate = cast(@StartDate as char(11))
Set @shortEndDate = cast(@EndDate as char(11))
BEGIN
Select
*
From
Table#a
Where
IssueDt Between @shortStartDate and @shortEndDate and
branch = 'OBK' and
Performed = 'Y' and
Station = @Station and ChargedBranch = @Branch and
ReqDate >= @shortStartDate
End
}
Declare @shortStartDate char(11), @shortEndDate char(11), @Station char(4), @Branch char(4)
Set @Station = (#prompt('Station')#)
Set @Branch = (#prompt('Branch')#)
Set @shortStartDate = cast(@StartDate as char(11))
Set @shortEndDate = cast(@EndDate as char(11))
BEGIN
Select
*
From
Table#a
Where
IssueDt Between @shortStartDate and @shortEndDate and
branch = 'OBK' and
Performed = 'Y' and
Station = @Station and ChargedBranch = @Branch and
ReqDate >= @shortStartDate
End
}
can you please provide more examples / explanation if possible.
ReplyDeletethanks in advance,
srikanth