Viewing 15 posts - 5,626 through 5,640 (of 8,731 total)
I'm sure that there's a more efficient solution in 2012 using LEAD() but I don't have access to a 2012 instance right now.
WITH wos AS(
SELECT Id,
...
October 22, 2014 at 3:36 pm
Maybe something like this:
SELECT
,[DATE]
FROM [dbo].[DATA]
WHERE ( = '12345' OR = '67890')
GROUP BY , [DATE]
HAVING...
October 22, 2014 at 1:49 pm
Did you leave something out of your post? There seems to be no reason to have the 3 left joins in that query as it is.
October 22, 2014 at 10:39 am
If your int looks like 20141022 (for today's date), you need to convert it to char(8) and then to date. If it's a numeric value representing the date as 41932...
October 22, 2014 at 10:35 am
I really feel bad for this guy. He keeps posting weird problems about SPs full of bad practices. I'm sure that he isn't the problem and the problem comes from...
October 22, 2014 at 10:27 am
Ed Wagner (10/22/2014)
GilaMonster (10/22/2014)
Similarly, if you invite people for a braai here, there better not be just burgers, though we don't have tradition of smoking stuff.
Isn't it interesting how so...
October 22, 2014 at 8:27 am
October 21, 2014 at 2:27 pm
Eirikur Eiriksson (10/21/2014)
Ed Wagner (10/21/2014)
Luis Cazares (10/21/2014)
Eirikur Eiriksson (10/21/2014)
Ed Wagner (10/21/2014)
Eirikur Eiriksson (10/21/2014)
Luis Cazares (10/21/2014)
Eirikur Eiriksson (10/21/2014)
spaghettidba (10/21/2014)
Ed Wagner (10/21/2014)
October 21, 2014 at 2:10 pm
Eirikur Eiriksson (10/21/2014)
Ed Wagner (10/21/2014)
Eirikur Eiriksson (10/21/2014)
Luis Cazares (10/21/2014)
Eirikur Eiriksson (10/21/2014)
spaghettidba (10/21/2014)
Ed Wagner (10/21/2014)
October 21, 2014 at 1:44 pm
Eirikur Eiriksson (10/21/2014)
spaghettidba (10/21/2014)
Ed Wagner (10/21/2014)
October 21, 2014 at 12:51 pm
Do you have something else in your code? Are you missing an end?
October 21, 2014 at 12:50 pm
Your pivot statement is correct, your syntax error might be elsewhere.
October 21, 2014 at 12:13 pm
I'm not sure that CONVERT alone can help.
Here's an example on how to group by weeks with unusual start days.
WITH E1(N) AS (
...
October 21, 2014 at 10:27 am
kd11 (10/21/2014)
October 21, 2014 at 10:11 am
Viewing 15 posts - 5,626 through 5,640 (of 8,731 total)