Viewing 15 posts - 1,441 through 1,455 (of 10,144 total)
richardmgreen1 (6/30/2016)
Thanks for that.
So I'd just just APPLY/LEFT JOIN as normal?
As for the linked server, I have to for now.
We're upgrading some servers to SQL2012 and then going to...
June 30, 2016 at 4:36 am
Treat it as any other tablesource, fashionably APPLY.
Are you really running this query against a linked server?
June 30, 2016 at 4:25 am
WITH _Tally AS (
SELECT n = ROW_NUMBER() OVER(ORDER BY (SELECT NULL))
FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) d1 (n),
(VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) d2 (n)
)
SELECT
t.ID,
x.FromDate,
x.ToDate
FROM @tbl t
CROSS APPLY (SELECT YearBoundariesCrossed = DATEDIFF(YEAR,t.Fromdate,t.Todate)) w
CROSS...
June 30, 2016 at 2:27 am
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:
June 29, 2016 at 4:15 am
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:
The Welsh aren't like...
June 29, 2016 at 3:57 am
tindog (6/29/2016)
ChrisM@Work (6/29/2016)
tindog (6/29/2016)
Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:The Welsh aren't like us humans.
I...
June 29, 2016 at 3:39 am
tindog (6/29/2016)
Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:
Texas, New Hampshire and California are getting uppity...
June 29, 2016 at 3:22 am
tindog (6/29/2016)
Now Wales are after independence from England to 'safeguard' their future...despite the fact that they also voted in favour of Brexit :w00t:
The Welsh aren't like us humans.
June 29, 2016 at 3:21 am
June 29, 2016 at 1:32 am
narayanamoorthy.a (6/28/2016)
So is it a problem with the code ?
Not really - it's a problem with the image datatype. It's been deprecated and will be removed in a future version...
June 28, 2016 at 9:28 am
Luis Cazares (6/28/2016)
ChrisM@Work (6/28/2016)
Just a thought - try this mod:
AVG(CAST(datalength(embedded_data) AS BIGINT))
More like this:
AVG(datalength(CAST(embedded_data AS varbinary(MAX))))
However, the image data type length can fit in an int.
From BOL for...
June 28, 2016 at 9:27 am
Just a thought - try this mod:
AVG(CAST(datalength(embedded_data) AS BIGINT))
June 28, 2016 at 9:09 am
select count(*), avg(datalength(embedded_data)) from task_attach where id_task_user = NEWID()
AVG_BIG()?
June 28, 2016 at 9:05 am
Just to recap, when you run the third query, this one:
-- checkin
select count(*), avg(datalength(embedded_data)) from task_attach where id_task_user in (
select id
from task_user
where task_type = 2
and date_begin >= CAST(CAST(DATEADD(DAY,-180,GETDATE())...
June 28, 2016 at 9:00 am
Brandie Tarvin (6/28/2016)
June 28, 2016 at 8:57 am
Viewing 15 posts - 1,441 through 1,455 (of 10,144 total)