today i not find the message ' time out query' again, I surprised perhaps because i using this tools.

for a few days ago i'm so confuse with my query because I using 'case' with my query and make it crosstab or pivot query layout, basicly i tried to create my own query which reporting pivot table and always stuck with that messages.

This tools supports all of the latest SQL Server features. It offers plenty of powerful tools for experienced users such as Visual Database Designer and Visual Query Builder to satisfy all their needs even a newbie will not be confused with it.

Thanks EMS it works...
"good deed not only with the intention but also having accompanied with science"

Sometimes we forget what we do, we assume all goodness, but don't, we only human being of habit which do not miss from wrong and sin and surely forgetting and the man who good not meaning which have never done mistake. but when wrong, they will fixing that mistake.

Seperti biasanya hari ini (kamis) aku niat puasa sunah senin/kamis, tapi sekitar jam 4 sore wawan (adikku) telpon dari rumah, dia bilang "a hari ini puasa?" aku bilang "insyaalah" kemudian spontan kata dia "cepet batalin, hari ini hari tasyrik".

Astaghfirullah, bener-bener lupa aku bahwa hari ini hari tasyrik yang memang diharamkan untuk berpuasa, karena disekitar ga ada sesuatu yang bisa dimakan langsung aja aku niat untuk ngebatalin puasaku hari ini dari pada dosa.

Tasyrik, ya kemarin hari raya iedul adha atau hari raya Kurban jatuh pada hari kesepuluh pada bulan Zulhijjah, bulan terakhir pada kalender Hijriah Islam. 10 Zulhijjah merupakan sejarah penting dalam Islam di mana Nabi Adam dan isterinya Hawa dikeluarkan dari syurga dan diturunkan ke bumi sebelum berjumpa di padang Arafah.

Hari tasyrik adalah tanggal 11, 12 dan 13 bulan Zulhijjah. Pada tiga hari itu umat Islam masih dalam suasana perayaan hari Raya Idul Adha sehingga masih diharamkan untuk berpuasa. Pada tiga hari itu masih dibolehkan untuk menyembelih hewan qurban sebagai ibadah yang disunnahkan sejak zaman nabi Ibrahim as.

Dan sekarang tanggal 12 Zulhijjah dan aku harus segera membatalkan puasaku. mudah-mudahan tidak menjadi dosa, amien

Sometimes we need to show report to show summary information at the intersection of row and columns called crosstab report.

Sometimes it is necessary to rotate results so that columns are presented horizontally and rows are presented vertically. This is known as creating a PivotTable, creating a cross-tab report, or rotating data.

Assume there is a table Pivot that has one row per quarter. A SELECT of Pivot reports the quarters vertically, the following is sample data :

SELECT Year,Quarter,Amount
FROM Pivot
Order BY Year

Output:
Year      Quarter      Amount
---- ------- ------
1990 1 1.1
1990 2 1.2
1990 3 1.3
1990 4 1.4
1991 1 2.1
1991 2 2.2
1991 3 2.3
1991 4 2.4
A report must be produced with a table that contains one row for each year, with the values for each quarter appearing in a separate column, such as:























Year
Q1
Q2
Q3
Q4
1990
1.1
1.2
1.3
1.4
1991
2.1
2.2
2.3
2.4

This is the SELECT statement used to create the rotated results:

SELECT Year,
SUM(CASE Quarter WHEN 1 THEN Amount ELSE 0 END) AS Q1,
SUM(CASE Quarter WHEN 2 THEN Amount ELSE 0 END) AS Q2,
SUM(CASE Quarter WHEN 3 THEN Amount ELSE 0 END) AS Q3,
SUM(CASE Quarter WHEN 4 THEN Amount ELSE 0 END) AS Q4
FROM Pivot
GROUP BY Year
This SELECT statement also handles a table in which there are multiple rows for each quarter. The GROUP BY combines all rows in Pivot for a given year into a single row in the output. When the grouping operation is being performed, the CASE functions in the SUM aggregates are applied in such a way that the Amount values for each quarter are added into the proper column in the result set and 0 is added to the result set columns for the other quarters.


source : MSSQL Server 2000 book