Viewing 15 posts - 16 through 30 (of 287 total)
I'm not sure if this helps the OP, besides the storage aspect of date types, the other thing to consider when using date literals is that there are ANSI, ISO,...
December 6, 2011 at 1:26 pm
Slightly shorter to use the Function (truncate) of the ROUND function:CAST(ROUND(@D,1, 1) AS DECIMAL (18,1))
December 1, 2011 at 12:16 pm
Here is another way for grins:declare @date datetime
set @date = '2011-11-08 21:30:00.000'
SELECT STUFF(LEFT('0' + CONVERT(VARCHAR(20), CAST(@date AS TIME(0)), 9), 11), 9, 0, ' ')
November 7, 2011 at 12:40 pm
You can also avoid doubling-up your single quotes by using the CHAR function:SELECT 'don' + CHAR(39) +'t'
September 29, 2011 at 1:57 pm
Burninator (9/23/2011)
September 26, 2011 at 2:18 pm
The documentation issues aside, I think Drew is saying it's easy to run a test and see if supplying a style as any affect on conversion from string to date:SET...
September 22, 2011 at 12:40 pm
Sorry I mis-read that as a table variable issue not a tabled valued function.
Can post the code? We might be able to help with some suggestions. If it's not...
September 9, 2011 at 12:25 pm
Well there could be lots of reasons. Perhaps jsut change the table variable to a temp table well help?
September 9, 2011 at 12:15 pm
I know the OP is asking about Truncating, but I would Disable (or drop) indexes first, then Truncate. The reason is that when you link the tasks in SSIS, people...
September 8, 2011 at 12:21 pm
Probably should this kind of formatting in the front end, but if you must do this is sql, maybe this will help:SELECT
EmpCode,
MIN(ShiftDateTime),
...
September 2, 2011 at 11:11 am
Something like:DECLARE @Flag CHAR(1)
IF EXISTS (SELECT Col1 FROM table1 INTERSECT SELECT col2 from table2)
BEGIN
SET @Flag = 'Y'
END
EDIT: bah too slow. 🙂
August 31, 2011 at 1:27 pm
Obviosuly, everything is SQL seems to be on a case-by-case basis. But, anytime you are using linked servers, you never know what the optimizer will do. I'm not sure if...
August 29, 2011 at 1:49 pm
4-5 TB, is pretty trivial for a year's worth of data. Any decently architected cube set (SSAS) should be just fine. I'm alwasy skeptical of the latest buzz word, so...
August 29, 2011 at 1:37 pm
Not the most effecient, but I think might work for what you are trying to do. If not, check out what Gail posted, so we can help you better:update
...
August 9, 2011 at 12:32 pm
Viewing 15 posts - 16 through 30 (of 287 total)