I'm wondering how others handle this situation... and how to apply the Don't Repeat Yourself (DRY) principle to this situation.
I find myself constantly PIVOTing or writing CASE statements in T-SQL to present Months as columns. I generally have some fields that will include (1) a date field and (2) a value field. When I present this bac...
Good morning,
I have a problem with this query:
SELECT
P.txt_nome AS Pergunta,
IP.nome AS Resposta,
COUNT(*) AS Qtd
FROM
tb_resposta_formulario RF
INNER JOIN formularios F ON
F.id_formulario = RF.id_formulario
INNER JOIN tb_pergunta P ON
P.id_pergunta = RF.id_pergunta
...
OK-
3 workbooks (one combined, and two seperate for two different combined areas) are accessing a CUBE reporting database that does a daily extract from Siebel.
Each workbook contains approximately 15 sheets, and about 25 pivot tables.
When a refresh all is done, and the OLAP query runs, it resets ONE of the filters on almost every s...
I have a "datadump" table that has a bunch of mixed performance-related data.
Something like:
MachID TestDate MachType Value1 Value2 ...
00001 01/01/09 Server 15 48
00001 01/02/09 Server 16 99
19999 01/01/09 Switch 32 4.9880
19999 01/02/09 Switch 32 5.8109
...
Hi,
I am trying to do some complex pivot query... and I need to do a select in the IN Clause...
Example of the Pivot
Looking at the Example in the above link, you can see they use the employee ids explicitly in their pivot. I would like to be able to do select instead of specifying the employee ids.
The only way I can think of doing...
We have an Excel spreadsheet with the Grand Totals at the top using a Forumla, but this isn't on the actual Pivot Table it's just in the spreadsheet.
We have a client that wants the Grand Totals at the top of the Pivot Table and doesn't want us to use Formula. Does anyone know if this is possible (even using VBA or something, just so lo...
I have three tables table1, table2 and table3
Table1
Id Data
1 Data1
2 Data2
3 Data3
Table2
Id Meta data
1 Meta data1
2 Meta data2
“ "
“ "
“ "
Table 3
Id Data ID Meta Data ID Value
1 Data1 Metadata1 Value1
2 Data1 Metadata2...
I have a data set (~10000 rows) with the following form:
+---------------------------+---------------+-------------+
| DateTimeCreated | Machine | ProductName |
+---------------------------+---------------+-------------+
| 2009-03-03 00:00:12.217 | COMP001 | Product001 |
+---------------------------+------------...
I need to design tables which stores all the (Attributes) metadata of Files i.e., FileName, Author, Title, CreatedDate ... and Custom Metadata ( Metadata added to files by Users)
Before examining the tables we can not say what and how many custom tags have been added on Files. Custom Tags i.i.e, CustUseBy, CustSendBy etc.
Now To store ...
Hello,
I am an excel newb, wondering if excel has built in functionality to do the following.
Turn this data:
Name | Activity | Option
Bob | Monday Activities | Golf
Bob | Tuesday Activities| Kayak
Marge | Monday Activities | Spa
John | Tuesday Activities| Soccer
Liz | Tuesday Activities| Spa
Into:
Name | Monday A...
I am trying to create a Stored procedure (or query expression) that Pivots on a grouping ID. After looking at the examples here and elsewhere I have failed to get my pivot statements to work in a stored procedure, and I am looking my help.
Also, if this could be done with LINQ on a LIST that would be a solution for me also.
theID ...
For example I have a table
IPPARSED
127
0
0
1
now I need to pivot the table so it can come like this
1 2 3 4
127 0 0 1
Can you help me how?
...
Is there a way to perform updates on a PIVOTed table in SQL Server 2008 where the changes propagate back to the source table, assuming there is no aggregation?
...
OK there are absolutely no good articles on the internet that I can find that explain or have code examples on how to create a pivot chart using VBA. I need this because I need the pivot chart to show different results depending on user selection in a form. There are some for Excel but the syntax is different for Access. I know this is a...
(Note: I have posted a variation on my earlier question as suggested)
Given an input xml file with following structure:
<widgets>
<widget shape="square" material="wood" color="red" />
<widget shape="square" material="metal" color="blue" />
<widget shape="square" material="plastic" color="green" />
<widget shape="squar...
I've seen this, so I know how to create a pivot table with a dynamically generated set of fields. My problem now is that I'd like to get the results into a temporary table.
I know that in order to get the result set into a temp table from an EXEC statement you need to predefine the temp table. In the case of a dynamically generated piv...
Source table:
Create Table ExamAnswers
{
StudentID varchar(12),
QuestionID int,
Answer char(1)
}
and this will be filled with
Bob 1 a
Bob 2 c
...
Bob 100 b
Chris 1 c
Chris 2 d
...
Chris 100 null
etc, for about 500 students.
Chris did not finish the exam, but the 100th question is stored as null, so it is guaranteed that e...
I have a table like so:
Fiscal Year, Region, Country, Office1, Office2, Office3, Office4
Where office 1-4 are foreign keys.
I would like to get output like so:
Office 1: Fiscal Year, Region, Country
Office 2: Fiscal Year, Region, Country
Office 3: Fiscal Year, Region, Country
Office 4: Fiscal Year, Region, Country
Can this be done usi...
I have the following situation in database:
Department table holds all departments in the company.
Employee table holds all employees, together with their department id and AllowedAbsenceDays field, which tells us how many days is the employee alowed to be absent in the current year.
Absence table holds all absences that occur in the...
Hello,
I would like to create a query from a single table with the following columns.
SEQNO is a unique key
Name ID Amount Date JOBID SEQNO
Mark 9 200 1/2/09 1001 1
Peter 3 300 1/2/09 1001 2
Steve 1 200 2/2/09 1001 3
Mark 9 200 3...