Viewing 15 posts - 1,456 through 1,470 (of 10,143 total)
narayanamoorthy.a (6/28/2016)
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[task_attach](
[id] [uniqueidentifier] NOT NULL,
[id_task_user] [uniqueidentifier] NOT...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 8:51 am
narayanamoorthy.a (6/28/2016)
Its foreign key. Unique identifier Not Null.
Both columns?
Please post CREATE TABLE scripts for both tables.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 8:41 am
What is the datatype of the two columns in the join?
...id_task_user in (select id ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 8:38 am
Ed Wagner (6/27/2016)
ChrisM@Work (6/27/2016)
Beatrix Kiddo (6/27/2016)
GilaMonster (6/26/2016)
Hugo Kornelis (6/26/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 8:36 am
Does the code execute successfully in SSMS?
select count(*), avg(datalength(embedded_data)) from task_attach where id_task_user in (
select id
from task_user
where task_type = 1 and [status] =7
and date_begin >= CAST(CAST(DATEADD(DAY,-180,GETDATE()) AS DATE)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 8:18 am
Newbi (6/28/2016)
I really am not aware of importance of order in group by. Those are not intentionally...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 6:57 am
Newbi (6/28/2016)
This is the final query which I make consistency in naming the columns.
Select * from
(SELECT Zone,ItemName, ItemCode, Quantity, GrossWeight
FROM ...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 6:43 am
Newbi (6/28/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 6:25 am
Newbi (6/28/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 6:23 am
SELECT
NewColumn,
[Old] = MAX(CASE WHEN ItemState = 'old' THEN [Stuff] ELSE NULL END),
[New] = MAX(CASE WHEN ItemState = 'new' THEN [Stuff] ELSE NULL END),
[Used] = MAX(CASE WHEN ItemState =...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 5:47 am
The inner query has errors. Work on it in isolation from the whole query.
SELECT Dept, IName, ICode, Quantity, GrossWeight
FROM Data_Details
UNION
SELECT Zone, ICode, IName, SUM(Quantity) AS TotalQ, SUM(GrossWeight) AS GrossWt...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 28, 2016 at 4:43 am
Are you by any chance attempting to perform a pivot or unpivot (rows to columns or vice versa)? If so, there may be alternative methods which are a) "standard" and...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 27, 2016 at 9:58 am
Beatrix Kiddo (6/27/2016)
GilaMonster (6/26/2016)
Hugo Kornelis (6/26/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 27, 2016 at 8:44 am
jasona.work (6/24/2016)
ChrisM@Work (6/24/2016)
Eirikur Eiriksson (6/24/2016)
Luis Cazares (6/24/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 24, 2016 at 10:03 am
Eirikur Eiriksson (6/24/2016)
Luis Cazares (6/24/2016)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 24, 2016 at 9:50 am
Viewing 15 posts - 1,456 through 1,470 (of 10,143 total)