Viewing 15 posts - 4,501 through 4,515 (of 13,465 total)
I think the core issue is parenthesis.
Because of the other two conditions the results still have the values he was trying to filter out.
and/and/or needs to be handled ,
October 26, 2012 at 3:39 am
Khades (10/25/2012)
Page cannot be displayed :(.I have a question, so if daylight savings were to change again in the future, I would have to go update this table correct?
fixed. i...
October 25, 2012 at 2:16 pm
is your data really ending in CrLf, or could it be a file form UNIX, where it's ending in just CHAR(10)? (LF)?
that would explain the errors.
October 25, 2012 at 1:54 pm
I've always handled this with a Calendar table, where the Calendar table has DaylightSavings column.
that is especially important if you fiddle with historical data, because the date ranges for DST...
October 25, 2012 at 1:52 pm
if the database is restored automatically each day, the easy solution is to add to teh current script, so that after teh restore, the mapping you need is performed.
if it's...
October 25, 2012 at 1:40 pm
Great job on providing the setup of the data.
by simply comparing the length of the string against the length of the replace of periods, you get the # of periods...
October 25, 2012 at 1:33 pm
your data is not just split by commas, is the issue; they are delimited or "Text Qualifed" with single quotes.
to handle taht gracefully, I think it is much...
October 25, 2012 at 12:13 pm
britinusa (10/25/2012)
So one literally has to run an ALTER rather than in 2000 where...
October 25, 2012 at 8:56 am
bulk insert does not automatically fire triggers unless you specifically set the flag (FIRE_TRIGGERS ).
I'm not sure your trigger is not designed to handle multiple rows correctly.
if i...
October 25, 2012 at 8:52 am
Andy Let me know if this helps at all.
What i usually do in that specific situation is to create a sql user, without login on the linked server that...
October 25, 2012 at 6:56 am
how many chances at this do i get to make it right again?
select
[active_end_time],
val ,
val + CASE WHEN CONVERT(int,SUBSTRING(val,1,CHARINDEX(':',val) -1)) > 11 THEN ' PM' ELSE ' AM' END...
October 24, 2012 at 2:41 pm
my sample data was all 6 characters;
this does the STUFF in reverse order, whhich would handle the 5 char times you are seeing sometimes.
select
[active_end_time],
REVERSE(STUFF(STUFF(REVERSE(convert(varchar,[active_end_time])),3,0,':'),6,0,':'))
+ CASE WHEN CONVERT(int,LEFT([active_end_time],2)) >...
October 24, 2012 at 2:35 pm
David's got me thinking to day!
your time datatype error is because of SQL 2005, i assumed you wer ein 2008 because of the forum you picked.
this puts ont he AM/PM:
select...
October 24, 2012 at 2:15 pm
stuff worked for me to convert it to an actual TIME datatype, but the AM/PM would be an extra step:
select
[active_end_time],
CONVERT(time,STUFF(STUFF(convert(varchar,[active_end_time]),3,0,':'),6,0,':') ) as val
from [msdb].[dbo].[sysschedules]
October 24, 2012 at 2:06 pm
Jet-Ski (10/24/2012)
October 24, 2012 at 2:02 pm
Viewing 15 posts - 4,501 through 4,515 (of 13,465 total)