Home » SQL & PL/SQL » SQL & PL/SQL » Help needed while working with composite primary keys (Oracle 11g)
Help needed while working with composite primary keys [message #514754] Wed, 06 July 2011 05:34 Go to next message
ashwathdesai
Messages: 1
Registered: July 2011
Junior Member
Hi,

I am working on a table which has following columns

P.code|A.Code|Start Date -->Composite Primary Key
1 11 12-March
2 21 16-Apr
3 31 28-May

Now this is my problem

I needed to generate an SQL query with following columns

P.Code|A.Code|Start Date|End Date
1 11 12-March 16-Apr
2 21 16-Apr 28-May
3 31 28-May NULL->this is not an issue

How do i generate End date column is my Biggest problem!

Re: Help needed while working with composite primary keys [message #514756 is a reply to message #514754] Wed, 06 July 2011 05:37 Go to previous message
cookiemonster
Messages: 13967
Registered: September 2008
Location: Rainy Manchester
Senior Member
Use lead
Previous Topic: How to raise a exception when inserting a record in a table using plsql?
Next Topic: How to avoid duplicate rows from being inserted in the table.
Goto Forum:
  


Current Time: Sun Aug 24 02:18:07 CDT 2025