pivot

WinForms Pivot Grid control with independent columns and rows

I need to add a pivot grid to an existing WinForms application. There are a number of commercial controls that meet the general requirements but fall short with one important one. The two I have looked at so far that come close are XtraPivotGrid Suite (www.devexpress.com) and PerpetuumSoft OLAP (PerpetuumSoft.com). Both of those contr...

Is it possible that we pass a query to PIVOT as column list in SQL Server?

As you know the PIVOT syntax is like below : FROM table_source PIVOT ( aggregate_function ( value_column ) FOR pivot_column IN ( <column_list>) ) table_alias I want to know is it possible that we pass a query as <column_list> to PIVOT? In action, I want to write FOR DepartmentName IN (SELECT Name From Department)) instead of ...

Help with Pivot / Unpivot

I have a table as below Name Priority Date ------------------------- A 2 d1 B 3 d2 How to write a query to achieve the below output ColumnNames d1 d2 -------------------------- Name A B Priority 2 3 Thanks ...

horizontal to vertical table transformation in SQL Server 2005

I have a page that dynamically builds forms input fields from a table allowing users to enter input into the form. Each input is a field in a _info table. I would like report showing all of the entries of a user in one line. Each field entry is a row. So I need to take the vertical data and make it horizonal. There are many different fo...

How to make awkward pivot of sql table in SQL Server 2005?

I have to rotate a given table from an SQL Server but a normal pivot just doesn't work (as far as i tried). So has anybody an idea how to rotate the table into the desired format? Just to make the problem more complicated, the list of given labels can vary and it is possible that a new label name can come into at any given time. Given ...

How do I do a Crosstab in Vertica

What is the Vertica equivalent of crosstab or pivot table found in PostgreSQL and other RDBMS's? ...

How to make additional columns on pivot of sql table in SQL Server 2005?

After getting such a great feedback from my last question. Maybe someone can help me with this problem also. I have to rotate a given table from an SQL Server but a normal pivot just doesn't work (as far as i tried). So has anybody an idea how to rotate the table into the desired format? Just to make the problem more complicated, the l...

Rows in their own columns depending on their date and symbolized by 'x' [closed]

Dear All, please help me since I'm newbie in SQL Server. I have a select query that currently produces the following results: DoctorName Team Visit date dr. As A 5 dr. Sc A 4 dr. Gh B 6 dr. Nd C 31 dr As A 7 Using the fo...

Can Sql Server 2005 Pivot table have nText passed into it?

Right bit of a simple question can I input nText into a pivot table? (SQL Server 2005) What I have is a table which records the answers to a questionnaire consisting of the following elements for example: UserID QuestionNumber Answer Mic 1 Yes Mic 2 No Mic 3 Yes Ste...

correct way to create a pivot table in postgresql using CASE WHEN

I am trying to create a pivot table type view in postgresql and am nearly there! Here is the basic query: select acc2tax_node.acc, tax_node.name, tax_node.rank from tax_node, acc2tax_node where tax_node.taxid=acc2tax_node.taxid and acc2tax_node.acc='AJ012531'; And the data: acc | name | rank --...

SQl rows to columns conversion

Hi, I have a table ClassAttendance and I'm using MSSQL 2005 studentID attendanceDate status ------------------------------------- *1004 2010-03-17 0 1005 2010-03-17 1 1006 2010-03-17 0 1007 2010-03-17 0 *1004 2010-03-19 0 1005 2010-03-19 ...

SQL Server 2008 pivot without aggregate

I have table to test score data that I need to pivot and I am stuck on how to do it. I have the data as this: gradelistening speaking reading writing 0 0.0 0.0 0.0 0.0 1 399.4 423.8 0.0 0.0 2 461.6 508.4 424.2 431.5 3 501.0 525.9 492.8 491.3 4 521.9 517.4 488.7 486.7 5 555.1 581.1 547.2 538.2 6 562.7 545.5 498.2 530.2 7 560...

How to Display result of subquery rows as one column in MySQL?

Hi I have three tables Category, Movies and RelCatMov Category-table categoryid, categoryName 1 thriller 2 supsense 3 romantic 4 action 5 sci-fi Movies-table movieid, movieName 1 Avataar 2 Titanic 3 NinjaAssassin RelCatMov-table categoryi...

Pivot Table in LINQ in VB.NET

Hi, I'm looking for doing a Pivot Table query in vb.net. I've found a lot of code in c# but not in VB.Net and i don't understand how to convert c# to VB. Can you help me? Thanks Ju ...

how to displaying pivot in matrix reporting service?

Dear All, I have problem relating to pivot query and matrix reporting. I don't know how to display it on matrix reporting service so it will dynamic column. Can any body help me to show how to configure the matrix table? or could you give the link where can I find the answer of my problem? I'm newbie in reporting service. ...

How to create a custom ADO Multi Dimensional Catalog with no database

Does anyone know of an example of how to dynamically define and build ADO MD (ActiveX Data Objects Multidimensional) catalogs and cube definitions with a set of data other than a database? Background: we have a huge amount of data in our application that we export to a database and then query using the usual SQL joins, groups, sums etc ...

Can't change pivot table's Access data source - bug in Excel 2000 SP3?

I have a set of Excel 2000 SP3 worksheets that have Pivot Tables that get data from an Access 2000 SP3 database created by a contractor who left our company. Unfortunately, he did all his work on his private area on the company (Novell) network and now that he has left us, the drive spec has been deleted and is invalid. We were able to ...

Pivot function in sql server 2008

how to carry out the pivot function i have a table with datas Day Period subject fromtime totime ---------------------------------------------- Monday 1st English 9:30 10:15 Monday 1st English 9:30 10:15 Monday 5th English 1:30 2:20 Monday 8th English 3:40 4:30 but i need the format as d...

Linq collection with a collection and pivot

Hi, I'm trying to convert the following structure: Name Metadata Metadata Name Metadata Metadata with data such as Fred Surname, Bill Dob, 20/01/2009 Mike Surname, Jones Dob, 10/09/2000 into a collection of an anonymous class with the following properties: Name, Surname, Dob I'm trying to do it through Linq an...

Kohana 2.3.4 ORM pivot table query

I'm trying to query a pivot table with Kohana's ORM and I'm wondering if there is a built in function I'm missing. Currently I only have 2 models setup for the tables "categories" and "products". There is a pivot table "categories_products", but I don't need a model for it when inserting data with this: $product = ORM::factory('product'...