Advertisement

04.29.2008 at 02:46AM PDT, ID: 23361444
[x]
Attachment Details

Need Help with a SQL Query

Asked by Collindsouza in PL / SQL, Oracle 9.x, Oracle 10.x

Tags: Oracle, 10g

I have 2 tables with the follwoing data(the colums names and the table structure are the same in both tables) Table B holds data of all the records that are already been extracted from Table A in the past. Table A displays newly added records

TABLE A

NAME    DATE in (DD/MM/YYYY)
====    ====
ABC      29/04/2008
DEF      29/04/2008
GHI      28/04/2008
KLM      27/04/2008
XYZ       04/04/2008
ZEE       28/04/2008
FEE       26/04/2008

TABLE 2

NAME    DATE in (DD/MM/YYYY)
====    ====
ABC     17/04/2008
DEF     17/04/2008
GHI     15/04/2008
KLM     14/04/2008
XYZ      04/04/2008

I want to write a select query that will give me all the newly added records in table A as well as those records where the date value of the names column in TableA are greater that those in tableB

so my query Result should return

NAME    DATE
====    ====
ABC      29/04/2008
DEF      29/04/2008
GHI      28/04/2008
KLM      27/04/2008
ZEE       28/04/2008
FEE       26/04/2008

I'm using Oracle 10G.
Start Free Trial
[+][-]04.29.2008 at 02:56AM PDT, ID: 21460789

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 02:58AM PDT, ID: 21460797

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PL / SQL, Oracle 9.x, Oracle 10.x
Tags: Oracle, 10g
Sign Up Now!
Solution Provided By: prasanthi_k
Participating Experts: 4
Solution Grade: A
 
 
[+][-]04.29.2008 at 03:22AM PDT, ID: 21460889

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.29.2008 at 05:07AM PDT, ID: 21461364

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.29.2008 at 06:31PM PDT, ID: 21467531

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.19.2008 at 06:32PM PDT, ID: 21602943

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.03.2008 at 10:32AM PDT, ID: 21702606

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628