Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.sqlserver.programming > #31364
| X-Received | by 2002:ad4:4507:: with SMTP id k7mr6574497qvu.40.1586980479888; Wed, 15 Apr 2020 12:54:39 -0700 (PDT) |
|---|---|
| X-Received | by 2002:a05:620a:138e:: with SMTP id k14mr28273036qki.452.1586980479621; Wed, 15 Apr 2020 12:54:39 -0700 (PDT) |
| Path | csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail |
| Newsgroups | microsoft.public.sqlserver.programming |
| Date | Wed, 15 Apr 2020 12:54:39 -0700 (PDT) |
| In-Reply-To | <1190dedf-2738-452d-bb11-23ad74088e91@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | google-groups.googlegroups.com; posting-host=173.162.45.17; posting-account=oUsksgoAAADjmotEgGTiI_3PeNLPQGJq |
| NNTP-Posting-Host | 173.162.45.17 |
| References | <32b39068-acc8-48ef-ac56-7f80bc2ee65b@googlegroups.com> <XnsAB9D8E503D7CEYazorman@127.0.0.1> <1190dedf-2738-452d-bb11-23ad74088e91@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <901f6665-b649-4e88-a0ac-d217996f1a35@googlegroups.com> (permalink) |
| Subject | Re: How do I order the columns on a pivot table? |
| From | John Hall <foundarecord@gmail.com> |
| Injection-Date | Wed, 15 Apr 2020 19:54:39 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 16 |
| Xref | csiph.com microsoft.public.sqlserver.programming:31364 |
Show key headers only | View raw
On Sunday, April 12, 2020 at 3:02:55 PM UTC-4, John Hall wrote: > On Sunday, April 12, 2020 at 7:59:26 AM UTC-4, Erland Sommarskog wrote: > > SELECT PE.TestID, > > MIN(CASE PU.PresentOrder WHEN 1 THEN PE.TextValue END) AS Param1, > > MIN(CASE PU.PresentOrder WHEN 2 THEN PE.TextValue END) AS Param2, > > MIN(CASE PU.PresentOrder WHEN 3 THEN PE.TextValue END) AS Param3, > > MIN(CASE PU.PresentOrder WHEN 4 THEN PE.TextValue END) AS Param4, > > MIN(CASE PU.PresentOrder WHEN 5 THEN PE.TextValue END) AS Param5 > > FROM ParametersEntries PE > > JOIN ParametersUser PU ON PE.TestID = PU.TestID > > GROUP BY PE.TestID > > ParametersUsed does not have a TestID column. But, I think I need to create a recordset from a join of ParametersUsed and ParameterEntries PU.ParameterId = PE.ParameterID It was strange. I replaced the TestID with ParameterID, but the 1 PE.TextValue duplicated into the 2nd column.??? but, the 3rd, 4th and 5th columns were correct. I changed from MIN to MAX and fixed that problem. RESOLVED!!!
Back to microsoft.public.sqlserver.programming | Previous | Next — Previous in thread | Next in thread | Find similar
How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-11 09:08 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-12 13:59 +0200
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 12:02 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-12 21:32 +0200
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-15 12:54 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-16 20:02 +0200
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 12:27 -0700
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 12:43 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-12 22:31 +0200
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 14:10 -0700
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 14:14 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-12 23:15 +0200
Re: How do I order the columns on a pivot table? John Hall <foundarecord@gmail.com> - 2020-04-12 14:18 -0700
Re: How do I order the columns on a pivot table? Erland Sommarskog <esquel@sommarskog.se> - 2020-04-12 23:41 +0200
csiph-web