Hi,
I want to create a crosstab query that looks like this
Date | Elevation 1 | Elevation 2 | ...
_______________ _______________ _______________ _______________ __________
Date 1 | xx.y | xx.y
Date 2 | xx.y | xx.y
xx.y are measurements taken at different dates at different elevations.
xx.y and elevation happen to be in the same format (meters).
The problem is, that the elevations in the column heading are numbers.
In the heading of the crosstab query in datasheet view they are all not
defined as numbers. They look like "286_983". That is the decimal point
is replaced by an underscore.
I needed them to be in number format, so I can plot the crosstab
Is there a way to change the number format? I tried cdec, but it
wouldn't work.
I don't want to change Elevation with Date (rowheading with
columnheading), because I want to make a chart from it later (and I
didn't find a way to make a chart with the rowheading as datasource for
the y-axis)
The SQL looks like this (WTelev are the xx.y in the sample above)
TRANSFORM Avg(WTelev) AS AvgOfWTelev
SELECT [date of sampling]
FROM qry_WTprof INNER JOIN {...}
GROUP BY [date of sampling]
ORDER BY [date of sampling]
PIVOT ElevationMP;
I'd appreciate any help!
Thanks,
Claus 2 5951
Claus Haslauer wrote: Hi, I want to create a crosstab query that looks like this
Date | Elevation 1 | Elevation 2 | ... _______________ _______________ _______________ _______________ __________ Date 1 | xx.y | xx.y Date 2 | xx.y | xx.y
xx.y are measurements taken at different dates at different elevations. xx.y and elevation happen to be in the same format (meters).
The problem is, that the elevations in the column heading are numbers. In the heading of the crosstab query in datasheet view they are all not defined as numbers. They look like "286_983". That is the decimal point is replaced by an underscore.
I needed them to be in number format, so I can plot the crosstab Is there a way to change the number format? I tried cdec, but it wouldn't work.
I don't want to change Elevation with Date (rowheading with columnheading), because I want to make a chart from it later (and I didn't find a way to make a chart with the rowheading as datasource for the y-axis)
The SQL looks like this (WTelev are the xx.y in the sample above)
TRANSFORM Avg(WTelev) AS AvgOfWTelev SELECT [date of sampling] FROM qry_WTprof INNER JOIN {...} GROUP BY [date of sampling] ORDER BY [date of sampling] PIVOT ElevationMP;
Change
PIVOT ElevationMP
to
PIVOT "Elevation " & Format(Elevatio nMP, "000.000")
This assumes the data type of the column "ElevationM P" is a numeric data
type.
--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
MGFoster wrote: Claus Haslauer wrote:
Hi, I want to create a crosstab query that looks like this
Date | Elevation 1 | Elevation 2 | ... _______________ _______________ _______________ _______________ __________ Date 1 | xx.y | xx.y Date 2 | xx.y | xx.y
xx.y are measurements taken at different dates at different elevations. xx.y and elevation happen to be in the same format (meters).
The problem is, that the elevations in the column heading are numbers. In the heading of the crosstab query in datasheet view they are all not defined as numbers. They look like "286_983". That is the decimal point is replaced by an underscore.
I needed them to be in number format, so I can plot the crosstab Is there a way to change the number format? I tried cdec, but it wouldn't work.
I don't want to change Elevation with Date (rowheading with columnheading), because I want to make a chart from it later (and I didn't find a way to make a chart with the rowheading as datasource for the y-axis)
The SQL looks like this (WTelev are the xx.y in the sample above)
TRANSFORM Avg(WTelev) AS AvgOfWTelev SELECT [date of sampling] FROM qry_WTprof INNER JOIN {...} GROUP BY [date of sampling] ORDER BY [date of sampling] PIVOT ElevationMP;
Change
PIVOT ElevationMP
to
PIVOT "Elevation " & Format(Elevatio nMP, "000.000")
This assumes the data type of the column "ElevationM P" is a numeric data type.
Hm, the number of zeros after the decimal point determines how many
decimal points show up in the crosstab query. Unfortunately, it doesn't
change the decimal separator in the crosstab query from an underscore to
a decimal point.
Hm, if I change rowheading and columnheading, I get a chart by
inseerting a ms graph chart into an access form that is what I want,
except that it is 90 degrees rotated (i.e. I'd like the x-axis to be the
y-axis and vice versa).
I searched on goole about this, but all results said, the y-axis is the
one that shows the range of the values. Is that true?
Thanks,
Claus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Thomas Jerkins |
last post by:
When I write a create table SQL statement I want to add some information about the column heading of each column.
How does the exact syntax for the create table look like (which includes this column data look)?
How do I add later column headings ?
Tom
|
by: pw |
last post by:
Hi,
I have month names (coming from a field in a table) as the column
heading in an Access 97 crosstab query. It is being sorted
alphabetically. This will not do. The only way that I know to get
around it is to use month numbers instead, but I'd rather have the
names appear.
Any ideas?
|
by: Steve |
last post by:
I have looked through the newsgroup for an answer to this but haven't
been able to find anything resembling my situation.
What I want to do is relatively simple, I think. I have a crosstab
query that is bound to a report I am creating. I would like the
column headings to be the name of the correspoding field name. For
example, I have field names ALS, BCD, HLP, and the detail section
prints the values for these fields. I would like...
|
by: Edward |
last post by:
ACCESS 2k
I need to design a report based on a rota system for staff at various
shops. The data is effectively stored in a single table, along the
lines of:
Initials (e.g. BH, FG, RM etc.)
Day (e.g. Monday, Tuesday etc.)
Shop (e.g. Shop1, Shop2 etc.)
StartTime (e.g. 8, 13 etc.)
|
by: Paula |
last post by:
I need to do a summary using a crosstab query. The data has a Date field
(Not named "Date"). I can do the Row Heading and Value but am having trouble
with the Column Heading. The summary Columns needs to read like:
Sept01 to Aug02 Sept02 to Aug03 Sept03 to Aug04
Can anyone give me a recommendation on how to get from the Date field to
these Column Headings? I then would like to set criteria where I can select
something that...
| |
by: carl.barrett |
last post by:
Hi,
I'm back with the same question as I still can't get it to display
my data the way I want it to.
The table lists information about a perpetrator involved with an anti
social behaviour order. The table contains personal information about
the individual as well as (here is where the letter dates comes in:)
e.g.
|
by: Kaur |
last post by:
Hi,
I have created a report based on a cross tab query and would like to
Sort the column heading of the report based on the sort order of
another field.
I have three tables called survey results, survey questions and survey
response choices. Survey response choices has over 800 choices types.
Survey results capture results of all the surveys and has questions,
respondent, response choice, response, responsechoice order which
looks...
|
by: Kaur |
last post by:
Hi,
I have created a report based on a cross tab query and would like to
Sort the column heading of the report based on the sort order of
another field.
I have three tables called survey results, survey questions and survey
response choices. Survey response choices has over 800 choices types.
Survey results capture results of all the surveys and has questions,
respondent, response choice, response, responsechoice order which
|
by: c8tz |
last post by:
This is a query I have created that picks up the top 3 dates for this
data (for example) :
Tree Pos2 Date
1 15 23/08/2005
1 20 12/02/2006
1 32 15/10/2006
2 17 23/08/2005
2 18 12/02/2006
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |