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
}

Comments

  1. can you please provide more examples / explanation if possible.

    thanks in advance,
    srikanth

    ReplyDelete

Post a Comment

Popular posts from this blog

RSV-VAL-0032 expression is not valid. If the item exists in a query but is not referenced in the layout, add it to a property list. CRX-API-0005 An error ocurred at or near the position '0'.

How can you extract all user information from Cognos Access Manager Namespace Report Utility and create Cognos Report out of it?

BME-EX-0047 Unable to read preferences for the requested interface..