Viewing 15 posts - 121 through 135 (of 201 total)
The column name goes after the END
case when ....
when ....
end as <column name>
/T
October 14, 2010 at 6:06 am
p.ravirao (10/14/2010)
Thanks a lot. switch case is working fine.But the excuetion time is high...
Well since i dont know how many countries you have to support its hard to know. A...
October 14, 2010 at 5:52 am
p.ravirao (10/14/2010)
Yes.Right but that leads to be lot changes required in the DB and application side.This report query just out of the application.
Well in that case. A CASE would probably...
October 14, 2010 at 4:37 am
Great question.
However... why does SQL let something get stored (and im not talking about the computed column itself since that aint stored... unless its persisted) in the database in...
October 13, 2010 at 11:44 pm
scott_lotus (10/13/2010)
4 Queries commited to SQL server 2005 TABLEA which contains 200M rows.
The running...
October 13, 2010 at 6:14 am
Something with Pivot maybe. One downside would be to get it to work when the month change. Probably some dynamic SQL is needed at that point. A small example.
declare
October 13, 2010 at 2:00 am
No perfect answer but maybe it can push you in the right direction.
create table #tbl (name varchar(128), s bigint)
declare @db varchar(128)
declare @sql varchar(2048)
select @db = ''
while exists (select...
October 12, 2010 at 6:00 am
tdmech56 (10/11/2010)
October 12, 2010 at 12:18 am
yjeevanrao (10/11/2010)
I need to check on both conditions fld_totalstopnumbers and fld_empid. fld_totalstopnumbers should not have the numbers like as shown bellow.
1,3,3,4 here total stops 4 and employees are 4
1,5,6...
October 11, 2010 at 6:24 am
Okay replicating the tables and then running your code.
select distinct fld_tripid
from tbl_tripdet
group by fld_tripid, fld_StopNumber
having count(*) > 1
Produces the exact same result as your code. If thats wrong... your...
October 11, 2010 at 5:04 am
Taking a shot at what i think you need.
select ID, Stopnumbers
from tbl_Details
group by ID, Stopnumbers
having count(*) > 1
This would give you all ID/Stopnumbers which have more then...
October 11, 2010 at 4:21 am
October 11, 2010 at 4:14 am
Jeff Moden (10/10/2010)
October 11, 2010 at 1:26 am
Couldnt you try to find which record have the postcode in the wrong position? Depends a bit offcourse on how your postcode looks like. But here in Sweden an IsNumeric...
October 8, 2010 at 6:31 am
Viewing 15 posts - 121 through 135 (of 201 total)