Viewing 15 posts - 1,396 through 1,410 (of 8,416 total)
Have you tried using a format that is not DATEFORMAT dependent?
The string '29/12/2011 12:00:00 AM' is probably being interpreted as the 12th day of the 29th month 🙂
For example:
'2011-12-29T00:00:00'
'2011-12-29'
'20111229'
See http://msdn.microsoft.com/en-us/library/ms180878.aspx#StringLiteralDateandTimeFormats
January 3, 2012 at 12:43 am
With the problem as stated, you don't need the join to employee. This gives the correct result without any joins:
DECLARE @Position TABLE
(
JobCode ...
January 2, 2012 at 11:32 pm
I can reproduce this (using the script exactly as written) on SQL Server 2008 R2 developer edition, build 10.50.2789 (SP1 + CU3, latest available) on Windows 7 Ultimate x64, with...
January 2, 2012 at 11:03 pm
BSavoie (12/31/2011)
December 31, 2011 at 4:12 am
Michael Valentine Jones (12/30/2011)
I don't think you really need a function for this, you should be able to do the conversion as inline code...
This seems like exactly the sort of...
December 30, 2011 at 11:57 pm
Duplicate thread.
http://www.sqlservercentral.com/Forums/Topic1228598-392-1.aspx
December 30, 2011 at 11:52 pm
This is the sample data in a more usable format:
CREATE TABLE dbo.Example
(
[User] VARCHAR(50) NOT NULL,
[Action] ...
December 30, 2011 at 11:51 pm
Jeff Moden (12/30/2011)
SQL Kiwi (12/30/2011)
drew.allen (12/30/2011)
December 30, 2011 at 11:28 pm
drew.allen (12/30/2011)
December 30, 2011 at 10:53 pm
All very good. And yes, a single DATEDIFF is 'better' than three DATEPARTs.
December 30, 2011 at 10:52 pm
I have a feeling I might be missing some subtlety here, but is this close to what you need?
DECLARE @Member TABLE
(
MemberID BIGINT NOT...
December 30, 2011 at 7:25 pm
ALZDBA (12/30/2011)
Whatever you do, make it an Inline Table Valued function
Absolutely. If the logic is not suitable for an in-line TVF, make it a CLR scalar function instead -...
December 30, 2011 at 7:17 pm
mtillman-921105 (12/30/2011)
WayneS (12/30/2011)
Steve Jones - SSC Editor (12/30/2011)
SQLRNNR (12/28/2011)
How much did that barn cost? I need one that is about 60'x100'$100k. 72x140, Big Top Structures.
Hmm. I think I need...
December 30, 2011 at 6:41 pm
Viewing 15 posts - 1,396 through 1,410 (of 8,416 total)