I am using Sql server 2008 and want to display result in Asp.net Front End.
I am a fresher.Please help.Thanks in advance.
CREATE TABLE dbo.TestInsertState
(
Id INT,
AppliedFor INT,
EntryDateTime DATETIME,
bUpdate BIT
)
INSERT INTO dbo.TestInsertState(Id,AppliedFor,EntryDateTime,bUpdate) VALUES(1,7,'10/06/2014',0)
INSERT INTO dbo.TestInsertState(Id,AppliedFor,EntryDateTime,bUpdate) VALUES(2,5,'10/28/2014',0)
INSERT INTO dbo.TestInsertState(Id,AppliedFor,EntryDateTime,bUpdate) VALUES(3,6,'10/28/2014',0)
INSERT INTO dbo.TestInsertState(Id,AppliedFor,EntryDateTime,bUpdate) VALUES(4,7,'11/01/2014',0)
Condition : if AppliedFor=7 and bUpdate=0 and DaysBeyond>21 working days(means Monday to Friday) that should be displayed.
if AppliedFor <>7 and bUpdate=0 and DaysBeyond>7 working days(means Monday to Friday) that should be displayed.
Result Expected:
Id
AppliedFor
EntryDateTime
bUpdate
DaysBeyond
1
7
06-Oct-2014
No
27
2
5
28- Oct -2014
9
3
6