Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2005, 06:17 AM
Registered User
 
Join Date: May 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to madhav007
Default Help in SQL:

I have a problem with one of the ouputs from a table.

The table looks like this:

due_date events count(due_date)
4/5/2005 Affina 1
4/5/2005 Ionics 1
4/5/2005 Ultimate 1
5/5/2005 Dresser 1
5/5/2005 First 1
6/5/2005 Ofoto 1

I want the table to look like this:

Due_date Slot1 Slot2 Slot3
4/5/2005 Affina Ionics Ultimate
5/5/2005 Dresser First NULL
6/5/2005 Ofoto NULL NULL


Can somebody please help me on how to get the resultatnt table using a SQL
Query.

Or if any suggestions on how i have to go about this.

Thanks
Madhavan
Bangalore
INDIA


 
Old May 17th, 2005, 06:59 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

I am afraid that this can be possible in a single SQL.
It may be possible with analysis services like cubes.

Even Is you go for manual pivoting hoe can you identify which is in Slot1/Slot2/Slot3 ... ?

If this is possible you can do a manual pivoting with a temperory table/ table datatype (MS-sql)

Prashant









Similar Threads
Thread Thread Starter Forum Replies Last Post
How Run .sql Script file in MS SQL Server 2000? aarkaycee SQL Server 2000 5 October 12th, 2009 05:43 AM
creating ssis packagte for sql server to sql serer Laxmikant_it ASP.NET 3.5 Professionals 0 November 26th, 2008 12:23 AM
Converting from MS SQL 2005 to Sql Epress edition saif44 SQL Language 0 February 16th, 2007 04:17 PM
Failed to copy objects from SQL server to SQL Serv monfu SQL Server 2000 4 December 4th, 2005 05:54 PM
Move SQL DB from one sql to another sql server Israr SQL Server 2000 3 January 24th, 2005 02:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.