Viewing 15 posts - 736 through 750 (of 807 total)
stewartc-708166 (2/22/2010)
Good question.
Please do not post useless thinks.
February 23, 2010 at 12:58 am
The main problem is not the format of date (dmy or mdy or ymd) nor if monday is the first day of the week, but identify the day '2010-2-1' as...
February 19, 2010 at 2:48 am
This code is indipendent from datefirst:
Monday is 0 and Sunday is 6
SELECT cast(cast('20100215' as datetime) as int)%7
SELECT cast(cast('20100216' as datetime) as int)%7
SELECT cast(cast('20100217' as datetime) as int)%7
SELECT cast(cast('20100218' as datetime)...
February 19, 2010 at 1:22 am
create table XPCmdShellOutput (OutputLine varchar(1000), ID INT IDENTITY(1,1))
Please add an identity column, so you can have output lines in the correct order
February 2, 2010 at 1:02 am
If one omits the set nocount on statement, then the results would be 1,1.
This assert is wrong.
The correct answer is 0,1, but the two statement should be the first in...
January 29, 2010 at 3:16 am
Volumes of data returned from tables may vary (test or production database), so a well performing query may slow down or give an error.
FROM BOL:
Including an extremely large number...
January 27, 2010 at 1:41 am
My answer is correct, but it's luck!
The text of the question is incomprehensible and the explanation is more and more incomprehensible.
December 29, 2009 at 12:54 am
If the SELECT statement returns no rows, the variable retains its present value. If expression is a scalar subquery that returns no value, the variable is set to NULL.
That...
December 14, 2009 at 1:17 am
The question is:
it is a BUG?
... or it is by design?
... or both: it is a BUG by design!
Try this:
DECLARE @v-2 char(10)
SET CONCAT_NULL_YIELDS_NULL ON
SELECT ISNULL('abcd'+@v,'1234567890')
RESULT: 1234567890
This behavior is...
December 11, 2009 at 8:34 am
Also a void string take 1 CHAR:
SET CONCAT_NULL_YIELDS_NULL ON
SELECT ISNULL('abcd'+''+null,'1234567890')
Result: 123456
December 11, 2009 at 6:19 am
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
Viewing 15 posts - 736 through 750 (of 807 total)