Viewing 15 posts - 2,821 through 2,835 (of 8,731 total)
Not entirely safe, but it could work.
SELECT *
FROM #Work
ORDER BY ISNULL( Activitycode, NCHAR(4600));
May 23, 2016 at 7:40 am
m.rajesh.uk (5/23/2016)
I need a query to get the data on hourly wise. Below query gives data on day basis.
SELECT
stat_date AS "date",
DATEPART(YEAR,stat_date) AS year,
SUBSTRING(CONVERT(VARCHAR(10),stat_date,102),0,8) AS year_month,
DATEPART(MONTH,stat_date) AS month,
DATEPART(WEEK,stat_date) AS week,
MAX(nb_error)...
May 23, 2016 at 7:12 am
crookj (5/20/2016)
Ed Wagner (5/20/2016)
Manic Star (5/20/2016)
Ed Wagner (5/20/2016)
yb751 (5/20/2016)
Ed Wagner (5/20/2016)
crookj (5/20/2016)
djj (5/20/2016)
Manic Star (5/20/2016)
Ray K (5/20/2016)
Manic Star (5/20/2016)
Beautiful (75 and partly cloudy)
Ugly
Duckling
Quack
Doctor
Demento
Shoes
Running
Walking
Tripping
Texting
Driving (WRONG!)
Crashing
May 20, 2016 at 12:58 pm
Ed Wagner (5/20/2016)
Luis Cazares (5/20/2016)
I'll probably have to wait...
May 20, 2016 at 11:10 am
Tomorrow there's a SQL Saturday in Atlanta and I can't attend. I'll miss the opportunity to meet Jason B and Wayne S.
I'll probably have to wait for next year or...
May 20, 2016 at 10:04 am
TheSQLGuru (5/20/2016)
Luis Cazares (5/20/2016)
WITH cte AS (
SELECT o.*,
...
May 20, 2016 at 9:04 am
Manic Star (5/20/2016)
Beautiful (75 and partly cloudy)
Ugly
average Joe
May 20, 2016 at 8:23 am
Ed Wagner (5/20/2016)
Luis Cazares (5/20/2016)
Ed Wagner (5/20/2016)
You have to love the dynamic crosstab. Nice work, Luis.
Thank you, Alan.
This has become simpler each time. It's even better now that I...
May 20, 2016 at 8:09 am
Lynn Pettis (5/19/2016)
Steve Jones - SSC Editor (5/19/2016)
drew.allen (5/19/2016)
May 20, 2016 at 8:06 am
Ed Wagner (5/20/2016)
You have to love the dynamic crosstab. Nice work, Luis.
Thank you, Alan.
This has become simpler each time. It's even better now that I have templates for the...
May 20, 2016 at 7:55 am
I wouldn't want to write 99 columns, so I would use a dynamic approach for this.
DECLARE @sql nvarchar(max);
WITH
E(n) AS(
SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)
),
cteTally(n) AS(
...
May 20, 2016 at 7:29 am
Just to be sure, because it's a common confusion. Are you using SQL Server?
In your post you mentioned autoincrement instead of identity (which is the word used in SQL Server)....
May 20, 2016 at 7:16 am
This should fix the concurrency problems, and a few pet peeves I have.
WITH cte AS (
SELECT o.*,
ISNULL((SELECT...
May 20, 2016 at 6:50 am
May 19, 2016 at 11:49 am
A different option. I included sample data generation, in case someone else want s to try something. It should have been provided by you in this way to prevent time...
May 19, 2016 at 11:41 am
Viewing 15 posts - 2,821 through 2,835 (of 8,731 total)