Viewing 7 posts - 1 through 8 (of 8 total)
Thanks , worked like a charm. 🙂
April 18, 2016 at 6:02 am
create table #emps (EN varchar(10))
insert into #emps values
('A'),
('B'),
('C'),
('D')
DECLARE @Names VARCHAR(8000)
SELECT @Names = COALESCE(@Names + ', ', '') + char(39)+en+char(39)
FROM #emps
print @Names
-- This query does'nt return any values when using...
December 10, 2015 at 8:33 am
Why doesn't this query return's any value . Whats wrong with this query
Select * from #emps Where EN IN (@Names)
December 10, 2015 at 8:13 am
Use of coalesce is not mandatory however the output has to be in the same format like 'A', 'B', 'C', 'D'
December 10, 2015 at 6:48 am
The above case is just a scenario , is there any possibility to get the desired output..? If how
December 10, 2015 at 6:04 am
Haaa Haa , It was not a homework , I was just trying to implement a business scenario for sharing bills between room mates. The above query works like a...
October 5, 2011 at 12:55 am
Viewing 7 posts - 1 through 8 (of 8 total)