473,569 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

please help

if i query like
select * from table1 then i will get the following
*************** *************** *************** *******
Ticker col2 col3 col4 col5
----------------------------------------------------
BRK.A 2003-05-02 70400.00 0.00 78500.00
FARM 2003-05-02 326.25 3.60 370.99
GREY 2003-05-02 680.00 4.00 832.00
-----------------------------------------------------------------------
BRK.A 2003-05-09 72700.00 0.00 78500.00
FARM 2003-05-09 313.00 3.60 370.99
GREY 2003-05-09 655.00 4.00 832.00
------------------------------------------------------------------------
BRK.A 2003-05-16 73550.00 0.00 78500.00
FARM 2003-05-16 311.50 3.60 370.99
GREY 2003-05-16 649.90 4.00 832.00
---------------------------------------------------------------------------
BRK.A 2003-05-23 73850.01 0.00 77000.00
FARM 2003-05-23 317.25 3.60 370.99
GREY 2003-05-23 665.00 4.00 832.00
--------------------------------------------------------------------------
BRK.A 2003-05-30 71000.00 0.00 75900.00
FARM 2003-05-30 322.00 3.60 370.99
GREY 2003-05-30 657.00 4.00 832.00

*************** *************** *************** *******

but my output should be as follows
*************** *************** *************** **
Ticker Item 5/2/2003 5/9/2003 5/16/2003 5/23/2003 5/30/2003
----------------------------------------------------------------------
BRK.A col3 70400.00 72700.00 73550.00 73850.01 71000.00
col4 0.00 0.00 0.00 0.00 0.00
col5 78500.00 78500.00 78500.00 77000.00 75900.00
-----------------------------------------------------------------------
FARM col3 326.25 313.00 311.50 317.25 322.00
col4 3.60 3.60 3.60 3.60 3.60
col5 370.99 370.99 370.99 370.99 370.99
-----------------------------------------------------------------------
GREY col3 680.00 655.00 649.90 665.00 657.00
col4 4.00 4.00 4.00 4.00 4.00
col5 832.00 832.00 832.00 832.00 832.00

*************** *************** *************** *
can anyone helpme how 2 create the query in order 2 obtain the required output
Jul 20 '05 #1
1 1187
Hi

It looks like you are wanting a pivot table. It is usually better to do this
on the client.
If you don't want to write the code to do it then something like
http://www.rac4sql.net/ can be used.

You can also do in the database, but these may be slow:
http://support.microsoft.com/default...;EN-US;q175574

http://www.sqlteam.com/item.asp?ItemID=2955

John

"kalyan" <ka*****@yahoo. com> wrote in message
news:98******** *************** ***@posting.goo gle.com...
if i query like
select * from table1 then i will get the following
*************** *************** *************** *******
Ticker col2 col3 col4 col5
----------------------------------------------------
BRK.A 2003-05-02 70400.00 0.00 78500.00
FARM 2003-05-02 326.25 3.60 370.99
GREY 2003-05-02 680.00 4.00 832.00
-----------------------------------------------------------------------
BRK.A 2003-05-09 72700.00 0.00 78500.00
FARM 2003-05-09 313.00 3.60 370.99
GREY 2003-05-09 655.00 4.00 832.00
------------------------------------------------------------------------
BRK.A 2003-05-16 73550.00 0.00 78500.00
FARM 2003-05-16 311.50 3.60 370.99
GREY 2003-05-16 649.90 4.00 832.00
-------------------------------------------------------------------------- - BRK.A 2003-05-23 73850.01 0.00 77000.00
FARM 2003-05-23 317.25 3.60 370.99
GREY 2003-05-23 665.00 4.00 832.00
--------------------------------------------------------------------------
BRK.A 2003-05-30 71000.00 0.00 75900.00
FARM 2003-05-30 322.00 3.60 370.99
GREY 2003-05-30 657.00 4.00 832.00

*************** *************** *************** *******

but my output should be as follows
*************** *************** *************** **
Ticker Item 5/2/2003 5/9/2003 5/16/2003 5/23/2003 5/30/2003
----------------------------------------------------------------------
BRK.A col3 70400.00 72700.00 73550.00 73850.01 71000.00
col4 0.00 0.00 0.00 0.00 0.00
col5 78500.00 78500.00 78500.00 77000.00 75900.00
-----------------------------------------------------------------------
FARM col3 326.25 313.00 311.50 317.25 322.00
col4 3.60 3.60 3.60 3.60 3.60
col5 370.99 370.99 370.99 370.99 370.99
-----------------------------------------------------------------------
GREY col3 680.00 655.00 649.90 665.00 657.00
col4 4.00 4.00 4.00 4.00 4.00
col5 832.00 832.00 832.00 832.00 832.00

*************** *************** *************** *
can anyone helpme how 2 create the query in order 2 obtain the required

output
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1688
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web browser that Hotmail does not support. If you continue to use your current browser software we cannot guarantee that Hotmail will work correctly for...
7
3584
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
7
3264
by: tyler_durden | last post by:
thanks a lot for all your help..I'm really appreciated... with all the help I've been getting in forums I've been able to continue my program and it's almost done, but I'm having a big problem that I believe if it's solved, the remaining stuff is easy... my full program until now is here: http://www.geocities.com/tom4_h4wk/progmail.zip the...
23
3245
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
13
4311
by: Joner | last post by:
Hello, I'm having trouble with a little programme of mine where I connect to an access database. It seems to connect fine, and disconnect fine, but then after it won't reconnect, I get the error "operation is not allowed when object is open" so I take out the line of code: BookDetails.Connection1.Open and it comes up with the error...
1
9607
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the...
1
54484
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and we instruct our experts to ignore any such PMs completely Be sure to give the version of Access that you are working with and the Platform and OS if...
0
3039
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
6
3296
by: jenipriya | last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors... The table structures i hav Employee (EmpID, EmpName,DeptID,DateOfJoin, Sal, Addr) Finance (EmpID, Sal) Club (Clubname, EmpID, Fee, DateOfJoin) Leave (EmpID, Date) Department (DeptID, DeptName,...
5
2298
by: tabani | last post by:
I wrote the program and its not giving me correct answer can any one help me with that please and specify my mistake please it will be highly appreciable... The error arrives from option 'a' it asks for user name, check in the system but does not return the correct answer please help me with it. or if you have better way of doing it would you...
0
7615
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...
0
7924
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7677
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...
0
7979
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...
1
5514
isladogs
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...
0
5219
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...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
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
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.