conditions in where clause
Simply this is enoughSelect * from @tempTable WHERE (Strtdate is not null and enddate is not null) or status <> 'CLRSM'Please Mark This As Answer if it helps to solve the issue Visakh...
View Articleconditions in where clause
Select * from @tempTable WHERE (status='CLSRM' AND strtdate IS NOT NULL AND enddate IS NOT NULL ) OR status='ELRN'Please use Mark as Answer; if my reply solved your problem. Use Vote As Helpful if a...
View Articleconditions in where clause
Are you looking for the below?Declare @tempTable table (id int, name varchar(50), status varchar(50), strtdate datetime, enddate datetime) insert into @tempTable values ( 1, 'A', 'CLSRM', '2-Feb-14',...
View Articleconditions in where clause
Try the Below Query if you want only the records that have start date and end date as null for status other than that of CLSRM and all the records with CLSRM excepth those with null start date and end...
View Articleconditions in where clause
HiDeclare@tempTabletable (id int,name varchar(50),statusvarchar(50),strtdatedatetime,enddatedatetime)insertinto@tempTable values ( 1, 'A', 'CLSRM', '2-Feb-14', '5-Feb-14'...
View Article