Ok Guys here the issue!
I can do this task using 3 crosstabs individually but:-
I have to report information on multiple training programmes. Each report is setup for periods 1 to 12 (period = 1 per month)
Crosstab 1 reports quantities of people starting training each period
Crosstab 2 reports quantities of people leaving training each period
Crosstab 3 reports quantities of people achieving their training programme for each period.
As stated I can do this by running each crosstab. I have to try and consolidate this system so that either through SQL or another process I can do the job.
Any advice from anyone who may have done something similar in the past??
Gareth
3 1188
Is this for a report? You can use subreports.
But if you want it all in one query I suppose you could use a union query, as long as the columns are all the same name and you have a row field to determine which row of records corresponds to which crosstab.
create a select query for each of your crosstabs. For a union...the number of fields output for each member has to match.
then paste the SQL into a final query so that it resembles this.
SELECT 'firstCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab
union all
SELECT 'SecondCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab
union all
SELECT 'ThirdCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab;
J
create a select query for each of your crosstabs. For a union...the number of fields output for each member has to match.
then paste the SQL into a final query so that it resembles this.
SELECT 'firstCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab
union all
SELECT 'SecondCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab
union all
SELECT 'ThirdCrosstab' as Source,[_Answers_Crosstab].UserID, [_Answers_Crosstab].[Total Of ID], [_Answers_Crosstab].[1], [_Answers_Crosstab].[2], [_Answers_Crosstab].[5]
FROM _Answers_Crosstab;
J
results look thusly
Source UserID Total Of ID 1 2 5
firstCrosstab 0 2 3 1 2
SecondCrosstab 0 2 3 1 2
ThirdCrosstab 0 2 3 1 2
Sign in to post your reply or Sign up for a free account.
Similar topics
by: BjoernJackschina |
last post by:
Hello,
I have this source code but I want to prevent the call for the next
page when the function is false. How could I do this? The function
'ueberpruefen' has a surrender value(true or false)....
|
by: Hal Vaughan |
last post by:
I've been reading up on file permissions (including FilePermission,
Permission, and Permissions). From what I see, these are temporary and
forgotten when a program exits (if I'm wrong, tell me,...
|
by: Mercury Mercurius |
last post by:
Please help - I'm at my wits' end....
I'm getting two different placements of some content wrapped in a
<span> tag in Netscape and Internet Explorer (big surprise!). I prefer
how the page looks in...
|
by: gamehack |
last post by:
Hi all,
I was thinking today, suppose we have the number
n = 0xAB 0xFF
which is equivalent to 44031 in decimal. In big endian it will be
stored as
10101011 11111111
but in little endian...
|
by: oliv |
last post by:
Bonjour,
Je cherche le moyen d'utiliser une variable d'environnement dans les
"Additional include directories" sous Visual C++ 6.0 mais je ne connais
pas la syntaxe à utiliser.
J'ai essayé...
|
by: guest1 |
last post by:
seems to be a problem in my first case stmt here i need to convert this and i dont know how, hope somebody can help me out
select distinct top 10
tplan.plan_long_nm,
asset.ast_cntr_pol_num,...
|
by: 88059355 |
last post by:
Let go of outdated belief systems,There are SIMPLE and EFFECTIVE Tools
to Deal with Worry!
I know most of you already know that worry is useless. Worry takes us
out of the present moment, where...
|
by: czi02 |
last post by:
this is my vb6.0
combo1 combo2
and a two listbox
the 1st listbox had a text.
then the secong one If I run the project I will type the text that has written in the 1st listbox.
|
by: czi02 |
last post by:
Hi there:
Im making a speedtest project. for example: I had two options: the 1min and 2min in the combo box. I had two listbox. The first listbox, I had a text that I ahb deen encode. Then the 2nd...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |