473,795 Members | 3,151 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transform Data - please please help... its important

1 New Member
I need to transform data from the access main and sub table for analysis

Main table

ID Seiz_Date Seiz_DateTx Seiz_DateYr
400 5 /1 /2006 aa 8
400 5 /2 /2006 vv 7
400 5 /13/2006 cc 5
400 6 /4 /2006 gg 3

transform to the format below

ID seix_Date1 seiz_Date2 seiz_Date3 seiz_date4 Seiz_DateTx1 Seiz_DateTx2 Seiz_DateTx3 Seiz_DateTx4 Seiz_DateYr1 Seiz_DateYr2 Seiz_DateYr3 Seiz_DateYr4
400 5 /1 /2006 5 /2 /2006 5 /13 /2006 6 /4 /2006 aa vv cc gg




or the format below....



ID seix_Date1 Seiz_DateTx1 Seiz_DateYr1 seiz_Date2 Seiz_DateTx2 Seiz_DateYr2 seiz_Date3 Seiz_DateTx3 Seiz_DateYr3 seiz_date4 Seiz_DateTx4 Seiz_DateYr4


where the No. of records for the ID can vary from 1 to 10

Please help its very necessary to do this tranformation.
Mar 11 '08 #1
1 1053
Stewart Ross
2,545 Recognized Expert Moderator Specialist
...ID Seiz_Date Seiz_DateTx Seiz_DateYr
400 5 /1 /2006 aa 8
400 5 /2 /2006 vv 7
400 5 /13/2006 cc 5
400 6 /4 /2006 gg 3

transform to the format below

ID seix_Date1 seiz_Date2 seiz_Date3 seiz_date4 Seiz_DateTx1 Seiz_DateTx2 Seiz_DateTx3 Seiz_DateTx4 Seiz_DateYr1 Seiz_DateYr2 Seiz_DateYr3 Seiz_DateYr4
400 5 /1 /2006 5 /2 /2006 5 /13 /2006 6 /4 /2006 aa vv cc gg
...
Hi. I'm sorry to say there is no simple or easy way to do the transform you mention in Access itself.

You want to take the individual rows, each with an ID, a date, and another reference, and transform those rows into single rows containing two lists, the first being all the dates from the individual rows for that ID, and the second all the references for that ID. The only way I could see of doing this to give the result you are after is to process all records in a loop, generate the lists for each row as part of the loop processing, then output the IDs and the lists to Excel, say. This is a non-trivial programming task.

Within Access it is possible to use crosstab queries on an individual basis to provide lists of dates, or lists of the references, but unfortunately these would list all dates and all references from all rows, not just the ones for that ID alone.

As an example, with just two IDs here is some sample data transformed using a crosstab query on the date alone (all the dates are listed in the header line):
Expand|Select|Wrap|Line Numbers
  1. ID 06/04/2006 01/05/2006 02/05/2006 13/05/2006 03/05/2007 04/05/2007 05/05/2007 06/05/2007 07/05/2007 08/05/2007 09/05/2007
  2. 400 06/04/2006 01/05/2006 02/05/2006 13/05/2006     
  3. 500                                                                                     03/05/2007 04/05/2007 05/05/2007 06/05/2007 07/05/2007 08/05/2007 09/05/2007
Sorry not to be able to provide a suitable solution which would help.

-Stewart
Mar 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1980
by: Barry Anderberg | last post by:
I have an XML document that I am trying to display in my ASP.NET page. I am using an XSL Transform to display repeating XML data in a specific format. It reads the data, and displays it on my page, but there's a problem. It runs all the data together on one line. The XSL file is as follows:
5
3612
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an instruction document (not data based) - same as using an xml web control. The resulting html is on the client? but what about the server side of things? Trying to figure out how to change and save the xmlDocument. It I put a button OUTSIDE of the...
8
2176
by: Luther Miller | last post by:
I am using the XML tranform functionality in .NET to transform data in a DataSet into XMLSS using an XSLT file I have created. There are about 100 columns and only about 120 rows in the data table being transformed - modest amount of data to say the least. The transform takes at least 10 seconds on a fast machine, which seems absolutely ridiculous. The DataSet contains many other tables in addition to the one I am
6
2491
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process I've hit a snag. How do I resolve multiple external references? The transform method on a stylesheet only takes one resolver, not an array Stephen
3
2384
by: Rouven Hertenstein | last post by:
Hi, I'm trying to test the vb.net-exercise "How to use a DataSet with the Office XP Chart Component and ASP.NET" on http://support.microsoft.com/kb/303016/en-us Visual Studio rails against the expression: "xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)" and comments: "Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As
3
2134
by: Andy | last post by:
Hi all, I'm having a problem doing an Xslt transform in code. I've done it before, so I'm not really sure why its not working. The problem is that the result of the transform is an empty string. I expected the xml to be transformed into a plain text document. Everything works fine when i transform using XmlPad. Here's the code (which does generate the Xml properly): Sample XML:
3
1834
by: vitaly.tomilov | last post by:
I'm using an ASP.NET form to display data from my database table, and I'm doing it in the following way: XmlDataDocument doc = new XmlDataDocument(mydataSet); XPathNavigator nav = doc.CreateNavigator(); XslTransform xslTran = new XslTransform(); xslTran.Load("Transform.XSL"); xslTran.Transform(nav, null, Response.Output, null); This produces me a nice HTML page with enhanced formatting specified
4
2262
by: hawat.thufir | last post by:
Just for posterity: $ pwd /home/thufir/xalon/w3school $ whoami thufir $ ll total 24 -rw-rw-r-- 1 thufir thufir 239 Feb 19 09:16 foo.xml
4
8532
by: Dean Card | last post by:
Okay, so here is the situation. I have need to do some on-the-fly image creation. I have everything working great except for the last part of it, applying a perspective type transform to the image. The transform will take a rectangular 2D image and transform it to a 3D representation in 2D. Please see the link to see what I am trying to do: http://seanberry.com/transform.png I have PIL v1.15 installed which has a PERSPECTIVE...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
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,...
0
10001
tracyyun
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...
0
9042
agi2029
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...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.