Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

where condition on same column doesnt return data

$
0
0
i have a question, below query doesn't return any data. application is allowing filters on same column. Is there any other to make it work[code="plain"]/*-------------------------Drop temp tables-------------------------------------------*/IF OBJECT_ID('tempdb..#employee') IS NOT NULL DROP TABLE #employee;create table #employee (Employeeid int not null primary key ,FirstNm varchar(50) not null,LastNm varchar(50) not null)insert into #employeeselect 1, 'John', 'abc'union select 2 , 'William','abc'union select 3, 'lary', 'pqr'union select 4, 'Linda', 'mvc'union select 5, 'Pat', 'pqrs'select * from #employeewhere FirstNm = 'John'and FirstNm = 'Linda'[/code]

Viewing all articles
Browse latest Browse all 3145

Trending Articles