Viewing 15 posts - 1 through 15 (of 82 total)
Looks like the sum was missed off the a.Rating to get a cumulative rating - looks like a typo!
Select b.Topic, c.CompanyName, sum(cast(a.Rating as int)) as 'Cumulative Rating'
from InfoTable a
Left...
April 24, 2006 at 5:23 am
select right('0' + convert(varchar,datepart(mm,getdate())),2)
January 5, 2006 at 2:24 am
I presume you just need to trim off the trailing spaces before you grab the last three characters:
declare @Table table (col1 char(60), Col2 char(60))
insert into @Table (Col1) values ('Test Test ...
December 9, 2005 at 10:34 am
July 4, 2005 at 9:01 am
declare @N decimal(19,2)
set @N = 654878766456412
select left(convert(varchar,convert(money,@N),1),len(convert(varchar,convert(money,@N),1)) - 3)
June 27, 2005 at 8:51 am
I see the exact same thing. I started seeing it only after I had had installed the beta version of SQL Server 2005 client tools.
I believe it is an Enterprise...
May 3, 2005 at 10:17 am
HOW to change them:
Just run the following commands before you re-create/alter the stored Proc:
SET QUOTED_IDENTIFIER OFF -- (or ON)
GO
SET ANSI_NULLS ON -- (or OFF)
GO
November 22, 2004 at 9:50 am
If you choose looping:
declare @s-2 varchar(1000)
set @s-2 = 'I am a boy of age 10.'
while @s-2 like '%' + space(2) + '%'
November 22, 2004 at 9:42 am
do a replace on the ascii number for a tab:
select ascii(' ') -- 9
update table set field = replace(field,char(9),' ')
/* optionally*/ where field like '%' + char(9) + '%'
March 5, 2004 at 6:54 am
dateadd(YY,-1,@DateVar)
February 13, 2004 at 10:23 am
I was going to try and explain, to point you in the right direction, and not just post a near complete solution, however I figured the code would explain it...
December 16, 2003 at 9:39 am
Hmm, full text doesn't support an asterix at the start of the word (ie: an end with or contains search).
Do you have to use full text? (how big is the...
December 16, 2003 at 5:14 am
Basic full text searching only returns whole word matches.
Therefore entering Laminat will not return Laminatg, etc...
However full text does support a starts with approach using the * symbol.
The query you...
December 16, 2003 at 5:03 am
Thanks Frank, just what I was after.
Cheers
David
December 15, 2003 at 4:12 am
This may not be the best way, but I guess you could check the existance of rows in the inserted and deleted tables, eg:
If there is an entry in the...
December 15, 2003 at 3:58 am
Viewing 15 posts - 1 through 15 (of 82 total)