[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Is there a way to change Crosstab query saved on access via Delphi programming ?

Asked by MachoLinKz in Delphi Database, SQL Query Syntax

Tags: Delphi access crosstab query

i have 2 crosstab query in access file (mdb) that i want to link using "UNION ALL" query

but the problem is, each crosstab query has static date range
how can i change that date range via delphi programming ?


or
is there another way i can make a crosstab query and add 1 Total row containing the sum of all rows above it ?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Crosstab 1
 
TRANSFORM Count(kartu.kartu_id) AS CountOfkartu_id
SELECT kartu.ghost
FROM (progress INNER JOIN kartu ON progress.type_progress=kartu.progress_akhir) INNER JOIN master_sales ON kartu.sales_id=master_sales.sales_id
WHERE (((kartu.kartu_date)<=#10/9/2023# And (kartu.kartu_date)>=#10/10/2009#))
GROUP BY kartu.ghost
PIVOT progress.type_progress;
 
 
 
Crosstab2
TRANSFORM Count(kartu.sales_id) AS CountOfsales_id
SELECT kartu.kartu_id
FROM (progress INNER JOIN kartu ON progress.type_progress = kartu.progress_akhir) INNER JOIN master_sales ON kartu.sales_id = master_sales.sales_id
WHERE (((kartu.kartu_date)<=#23/10/09# And (kartu.kartu_date)>=#10/10/09#))
GROUP BY kartu.kartu_id
PIVOT kartu.progress_akhir;
[+][-]10/24/09 07:17 PM, ID: 25655247Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/25/09 09:08 PM, ID: 25659612Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625