Hi there,
My question does not concern the exporting of data to CSV so much as the format of the exported data. The data to be exported consists of a time series of prices for a number of assets. I can easily bring up a query of the data I want to export in the following way: -
SELECT Date, Asset, AssetPrices
-
FROM tblPrices;
-
returning: -
[Date],[Asset],[AssetPrice]
-
date_1,asset_1,price_1
-
date_2,asset_1,price_2
-
date_3,asset_1,price_3
-
etc....
-
date_1,asset_2,price_1
-
date_2,asset_2,price_2
-
date_3,asset_2,price_3
-
etc....
-
date_1,asset_3,price_1
-
date_2,asset_3,price_2
-
date_3,asset_3,price_3
-
etc....
-
However, in the CSV format I would like the prices to be aligned in the following way: -
"Date","Asset_1","Asset_2","Asset_3"
-
date_1,price_1, price_1, price_1
-
date_2,price_2, price_2, price_2
-
date_3,price_3, price_3, price_3
-
etc....
-
So, taking a 1-dimensional data structure within Access and exporting it as a 2-dimensional data structure. Does anyone know how to do this? Two possibilities might be to (1) create a data structure in Access to then export to CSV or (2) export each asset's data series at a time, appending successive columns of data within the CSV file.
Any help greatly appreciated.
2 1821
For this you need a cross table query.
Place the fields like:
Date, Asset, AssetPrices
in the query editor and change the query type to cross-table.
Now change the GroupBy under the AssetPrices into "Max"
Finally set the fields in the "combo line" for the cross table like:
Rowheader, ColumnHeader and Value
Nic;o)
Perfect! Thanks, Nic.
I've been looking for this kind of formatting in Access (obviously not very hard) for about a year!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sridevi |
last post by:
Hello
How to export data from ms-access database to excel worksheet using ASP.
mainly i need to export data to multiple worksheets. it is very urgent to
us.
i have a sample code which works...
|
by: D |
last post by:
I've created a report with many subreports of aggregate data. I want my
client to be able to export this data to Excel to make her charts, etc. Only
one problem: one of the fields is a "SchoolYear"...
|
by: Stephan Golux |
last post by:
Hello.
I am using an access 97 application that exports a report to RTF format,
which is subsequently emailed to various people.
The main informational field in the report is a free form memo...
|
by: mik18 |
last post by:
I'm having trouble with exporting reports to Word in the rtf format and
I'm hoping someone has a solution. The reports are losing their
formats. Not all the formating is lost but some is and of...
|
by: PC Datasheet |
last post by:
AccessXP in 2000 mode.
I am running a procedure using Application.ExportXML. The XML file begins
with:
<?xml version="1.0" encoding="UTF-8" ?>
- <dataroot...
|
by: kim |
last post by:
Hello! Here, in brief, is my problem.
Access 2002. I need to export to a csv text file with text delimiters
on every field. I find that if I save the original data in Excel and
make sure the...
|
by: Mustufa Baig |
last post by:
I have an ASP.NET website where I am showing off crystal reports to users by
exporting them to pdf format. Following is the code:
----------------
1 Private Sub ExportReport()
2 Dim oStream...
|
by: sara |
last post by:
I have what I think is a little strange...I have to get data from our
payroll system into a specific format (fixed record length) as a .txt
or .prn file only to upload to our 401k custodian.
I...
|
by: =?Utf-8?B?ZGVuIDIwMDU=?= |
last post by:
hi,
I trying to export data display on a gridview that supports any language
(like chinese, japanese, thai, french) shown here is chinese only. There is
no problem exporting english language...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
|
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,...
|
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...
| |