Viewing 15 posts - 3,946 through 3,960 (of 7,636 total)
I just checedk BOL again and according to it, the ISO 8601 format is unambiguous in SQL Server. Thing is, apparently I have been using a shortened colloquial form...
January 8, 2009 at 4:03 pm
I'm with you Gus. The ISO 8601 standard was godsend when it came out. I really would not want to have to go back to constructing dates by...
January 8, 2009 at 3:35 pm
Yeah, but "YDM" is not the date standard for any nation. That's why ISO choose it. And what is the alternative way to do this that is not...
January 8, 2009 at 3:20 pm
OK, I checked and yes, "YYYY-MM-DD" is the ISO 8601 standard for "unambiguous numerical text date format". (see here: http://www.uic.edu/depts/accc/software/isodates/index.html).
Also, as to the representation of date constants, here is what...
January 8, 2009 at 2:51 pm
Chris Morris (1/8/2009)
stricknyn (1/8/2009)
select datediff(year, '2008-01-09 00:00', '2009-01-08 00:00')
Why would you want to make a statement like this with ambiguous dates? If I run your code here in the...
January 8, 2009 at 2:39 pm
A much better way is to use the OUTPUT clause,like this:
--====== Make our test table to insert to
Create Table InsertIDTst(
ID int identity primary key
, ColName nvarchar(255)
, object_id int);
GO
--====== Make a...
January 8, 2009 at 2:29 pm
Figured it out:
Select DATEADD(dd,DATEDIFF(dd,0, getdate()), 0)
January 8, 2009 at 12:40 pm
The "DATEDIFF" method is supposed to be the fastest, but I can never remember it off the top of my head.
January 8, 2009 at 12:36 pm
There are several ways to strip the time out, here is one:
select cast(floor(cast(getdate() as Float)) as datetime)
January 8, 2009 at 12:25 pm
RBarryYoung (1/8/2009)
January 8, 2009 at 12:08 pm
Erin: If you take this route, based on the App Name attached to the connection, you should be aware that this is just a barrier, it's not truly secure...
January 8, 2009 at 11:57 am
The only thing that I can think of here is that maybe your sProc is doing a SELECT into a table with a different schema/owner, but when you execute your...
January 8, 2009 at 11:51 am
For testing you generally follow one of the following approaches in order to normalize this otherwise inconsistent behavior:
1) empty the caches before each individual test, or
2) do several iterations of...
January 8, 2009 at 11:45 am
Viewing 15 posts - 3,946 through 3,960 (of 7,636 total)