Viewing 3 posts - 1 through 3 (of 3 total)
Try to build your query like this
SELECT * FROM TABLEname WHERE ColumnName='BA00044' OR ColumnName NOT LIKE 'BA%'
September 17, 2013 at 5:37 am
Hope this helps.
create table tblname (id int identity(-1,1),name varchar(2))
DECLARE @MAXID INT
SELECT @MAXID = MAX(id) FROM tblname
--if @MAXID + increment value = 0
if(@MAXID+1=0)
BEGIN
SET identity_insert tblname ON
insert into tblname(id,name) values('1','d')
SET identity_insert tblname...
August 29, 2013 at 1:42 am
Another way of doing this using GROUP BY,
with cte1 as (
select DT from dp group by DT having COUNT(distinct type)=1 and count(nr)>1
),
cte2 as (
select DT from ln...
August 7, 2013 at 3:04 am
Viewing 3 posts - 1 through 3 (of 3 total)