Viewing 8 posts - 1 through 8 (of 8 total)
Thanks so much for your replies!!
But, my table have only one column, the table structure look like --
Create table latest_value
(
[name] varchar(50)
)
April 26, 2010 at 12:23 am
Ignore my last post and try this CODE
---- For 2nd highest value
select max(salary) from employee_details e1
where 2 <=(select count(*) from employee_details e2 where e1.salary<= e2.salary)
---- For 2nd highest...
May 19, 2009 at 11:46 pm
select max(salary) from employee_details e1
where 2 <=(select count(*) from employee_details e2 where e1.employeeid <= e2.employeeid)
May 19, 2009 at 11:38 pm
Nice one, but frankly i m not satisfied with Mr. Ramesh answers, because i run and tried the query and found that sometimes it shows incorrect output. Sorry Boss...
April 4, 2009 at 3:34 am
select substring(column_name, 1, charindex(',,', column_name) -1) +
case
when replace(substring (column_name, charindex(',,', column_name), len(column_name)),',','') = ' ' then ''
when replace(substring (column_name, charindex(',,', column_name), len(column_name)),',','') <> ' ' then
+','+replace(substring (column_name, charindex(',,', column_name),...
April 4, 2009 at 12:13 am
Very easiest way for replacing comma from value
select replace (column_name, ',', '') from table_name
April 3, 2009 at 11:15 pm
select convert(datetime, convert(float, getdate()) - floor(convert(float, getdate())))
March 13, 2009 at 4:04 am
Viewing 8 posts - 1 through 8 (of 8 total)