Viewing 15 posts - 766 through 780 (of 828 total)
vk-kirov, I agree with you. Question and answer is incomprehensible!!!!
December 9, 2009 at 1:14 am
rcavill (12/7/2009)
You need the optionMust declare the scalar variable "@Dec".
When running on a Case Sensitive collation.
Once that select statement on line 2 is adjusted then it would work.
------
Robert
Have good luck...
December 7, 2009 at 3:28 am
Explanation is in the note.
Try to reduce the precision.
SELECT CAST(cast(1.67574 as decimal(38,10)) / cast(10000 as decimal(38,10)) AS DECIMAL(38,10) ) conv_factor
returns 0.0001670000
SELECT CAST(cast(1.67574 as decimal(29,10)) / cast(10000 as decimal(29,10)) AS...
December 4, 2009 at 7:34 am
SQLBOT (11/29/2009)
Comments posted to this topic are about the item <A HREF="/questions/Datetime+Manipulation/68075/">Datetime precision</A>
Thanks. After year and years working with sql, there always is something to learn.
November 30, 2009 at 6:34 am
Rob Goddard (11/27/2009)
does the optimizer spot this and skip all the variable assignments and just do the last one?
All the variable assignments are done.
November 27, 2009 at 7:00 am
Wouldn't you always get a row returned with the COUNT(*) aggregate? It might return 0 as the result but that still returns a row.
That's true!
November 25, 2009 at 6:38 am
WARN: If you use an aggregate function @a will be updated also if no row is returned
[font="Arial"]SET NOCOUNT ON
declare @vals table (iKey int, iValue int)
insert into @vals (iKey, iValue)
select...
November 25, 2009 at 6:24 am
Noel McKinney (11/3/2009)
This is the main reason I make it a habit to use COALESCE rather than ISNULL unless there's a reason I need the behavior of ISNULL.
I prefer ISNULL...
November 3, 2009 at 6:07 am
From BOL:
Return Types
Returns the same type as check_expression.
In this case, a cast from varchar(12) to varchar(10)
November 3, 2009 at 1:34 am
San-847017 (10/28/2009)
I always increment identity column with default value.
I used a seed = 1 and an increment of 5 and in another table seed = 2 and an increment of...
October 29, 2009 at 2:49 am
Min-437192 (10/18/2009)
Yours is pretty cool, but what do I need to modify if I want to get rid of duplicates? 🙂
Simply add DISTINCT clause.
create table fruit(name varchar(20))
insert into...
October 18, 2009 at 11:25 am
msam77-503326 (10/15/2009)
declare @res varchar(Max)
select @res = coalesce(@res + ',', '') + [name]
from
(
select 'Apple' as...
October 17, 2009 at 9:20 am
declare @l varchar(max)
,@comma varchar(2)
set @l = ''
set @comma = ''
select @l = @l + @comma + name
,@comma = ', '
from
...
October 14, 2009 at 6:17 am
Viewing 15 posts - 766 through 780 (of 828 total)