Viewing 15 posts - 421 through 435 (of 3,544 total)
Grant Fritchey (9/9/2016)
GilaMonster (9/9/2016)
Grant Fritchey (9/9/2016)
BrainDonor (9/9/2016)
Far away is close at hand in the images of elsewhere.
Anon.
September 9, 2016 at 4:17 am
Notwithstanding the above comments, I think using a static datetime value would have been better to remove ambiguity.
Also there is no mention in the answer of the datatype precedence in...
Far away is close at hand in the images of elsewhere.
Anon.
August 30, 2016 at 6:40 am
Check
and
Far away is close at hand in the images of elsewhere.
Anon.
August 25, 2016 at 1:58 am
Jeff Moden (8/18/2016)
Far away is close at hand in the images of elsewhere.
Anon.
August 19, 2016 at 2:27 am
Luis Cazares (8/9/2016)
Far away is close at hand in the images of elsewhere.
Anon.
August 9, 2016 at 8:25 am
Tallboy (8/9/2016)
Hi David,That is exactly what I was looking for...
I wonder tho can it be done recursively!
kind regards
WITH
cte (MonthEnd)
...
Far away is close at hand in the images of elsewhere.
Anon.
August 9, 2016 at 7:33 am
Y.B. (8/9/2016)
David Burrows (8/9/2016)
SELECT DATEADD(week,Weeks,@StartDate) AS [MonthEnd]
FROM (VALUES (0),(4),(8),(12),(16),(20),(24),(28),(32),(36),(40),(44),(48),(32)) w (Weeks)
Hi David,
I think you have a typo in your values...shouldn't that 32 at the end be a 52?...
Far away is close at hand in the images of elsewhere.
Anon.
August 9, 2016 at 7:18 am
SELECT DATEADD(week,Weeks,@StartDate) AS [MonthEnd]
FROM (VALUES (0),(4),(8),(12),(16),(20),(24),(28),(32),(36),(40),(44),(48),(52)) w (Weeks)
Far away is close at hand in the images of elsewhere.
Anon.
August 9, 2016 at 6:22 am
SELECT T.ID1,
CAST(T.[StartDate] AS DATE) TaskStartDate,
MAX(CASE WHEN DATEDIFF(DAY, getdate(), T.[StartDate]) > 0 THEN ROUND(0 ,3)
...
Far away is close at hand in the images of elsewhere.
Anon.
August 8, 2016 at 6:58 am
John Mitchell-245523 (8/2/2016)
...Be careful if you have any non-leading "-"s that you want to keep, though.
SUBSTRING([column],PATINDEX('%[^-]%',[column]),255)
Far away is close at hand in the images of elsewhere.
Anon.
August 2, 2016 at 6:51 am
Grant Fritchey (6/3/2016)
Far away is close at hand in the images of elsewhere.
Anon.
June 3, 2016 at 6:29 am
R.P.Rozema (6/1/2016)
It may look easy, but still the solution provided was wrong.
If you replace DateAndTime with Value in the ORDER BY, it will be correct 🙂
Far away is close at hand in the images of elsewhere.
Anon.
June 1, 2016 at 7:47 am
Sean Lange (6/1/2016)
You can do this easily using TOP.
Too easy when you give the answer 😛
Mind you it's what I normally do 😀
Far away is close at hand in the images of elsewhere.
Anon.
June 1, 2016 at 7:23 am
Use
WHERE to filter the data
ORDER BY to put the data in the required order
TOP to restrict the output to one row
Post what you have so far and someone will help
Far away is close at hand in the images of elsewhere.
Anon.
June 1, 2016 at 7:17 am
Luis Cazares (5/31/2016)
Is SQL Fertilization the reason we have so much code and practices that look like feces?
In the beginning there was SQL Server.
God said 'Let there be light'.
Click!
And there...
Far away is close at hand in the images of elsewhere.
Anon.
May 31, 2016 at 10:51 am
Viewing 15 posts - 421 through 435 (of 3,544 total)