Viewing 15 posts - 1,921 through 1,935 (of 3,957 total)
Oh yes. And I also noticed that your conversion of my DATETIME2 code causes the same 1ms of inaccuracy.
So presumably, if we're willing to live with 1ms of...
February 21, 2013 at 11:21 pm
Jeff,
When I try this:
SELECT GETDATE()
,DATEADD(hh, ABS(LEFT('41:41:41.041',2)), GETDATE()+('00:'+RIGHT('41:41:41.041',9)))
I get these results:
2013-02-22 12:54:58.843 2013-02-24 06:36:39.883
When I do the math 843+041=884 - so what's up with that...
February 21, 2013 at 11:01 pm
Just a few points:
1. While I didn't actually try it, I don't think the code you provided can be run because @cur_code doesn't seem to be defined anywhere and you...
February 21, 2013 at 6:21 pm
A long time ago, in a galaxy far, far away, when I was but a SQL-youngling, I experimented with Calendar tables and wrote a function that would generate a calendar....
February 21, 2013 at 6:01 pm
You're definitely on the right track to give us what we need to help you and reading the forum etiquette article was a smart thing to do.
You didn't provide the...
February 21, 2013 at 5:31 pm
L' Eomot Inversé (2/21/2013)
a little more than 2**48 (256 trillion - counting 1024 instead of 1000 as thousand) rows (actually 281475010265089, which is 1+2**25+2**48). :w00t:
Now that's a...
February 21, 2013 at 5:23 pm
Magoo you've done it again! (love that catchphrase)
Seriously, +1 because that's I think the OP needs.
February 21, 2013 at 6:00 am
wafw1971 (2/21/2013)
I didn't mean to offend you, if that's the case I am sorry. My boss helped me with that query, is it not right?
1.35 Million Records of...
February 21, 2013 at 4:59 am
wafw1971 (2/21/2013)
UPDATE BOOKINGS
SET DepartureDate =
DATEADD(day,
CASE WHEN Rand(CHECKSUM(NEWID())) BETWEEN 0 and 0.3 THEN 2 ELSE
CASE WHEN Rand(CHECKSUM(NEWID())) BETWEEN 0.3...
February 21, 2013 at 3:38 am
ajames 36824 (2/20/2013)
February 20, 2013 at 8:15 pm
In the future, my suggestion is that you try to help your helpers a bit by providing DDL and consumable sample data like this:
DECLARE @Imbibing TABLE
(ClientID...
February 20, 2013 at 6:24 pm
ChrisM@Work (2/20/2013)
wafw1971 (2/20/2013)
Its alright I have figured it out:...
DwainC already figured it out for you:
SELECT
ArrivalDate,
BookingDate = DATEADD(day,
-(1 + ABS(checksum(NEWID())) % 90),
ArrivalDate)
FROM Bookings
ORDER BY ArrivalDate
I thought...
February 20, 2013 at 5:59 pm
ChrisM@Work (2/20/2013)
Always run the corresponding SELECT first. It will show you which rows will be updated, and from what to what. The corresponding SELECT for this UPDATE is this:
+1 INSERTs...
February 20, 2013 at 5:57 pm
Kingston Dhasian (2/18/2013)
Jeff Moden (2/15/2013)
I suppose consistency is a good reason. But, let's try something just for fun. Write some code to add 41:41:41.041 to a given date.
My...
February 20, 2013 at 5:52 pm
Steven Willis (2/20/2013)
sunder.mekala (2/20/2013)
I am trying to write a sql to find the minimum of a dataset
i am using sql server.
select ST.BG_DTTM
,MIN(ST.BG_DTTM) over(ORDER BY ST.BG_DTTM) AS "Minim"
from
tablename ST
but it...
February 20, 2013 at 5:39 pm
Viewing 15 posts - 1,921 through 1,935 (of 3,957 total)