Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: need to check details in a table

Re: need to check details in a table

From: Ed Prochak <ed.prochak_at_magicinterface.com>
Date: Sat, 04 Jan 2003 15:22:11 GMT
Message-ID: <3E16FF3D.BBEB2EE5@magicinterface.com>


Jimbo wrote:
>
> I want to prompt the user to enter a supplier number (e.g. 3332), and then
> check whether that supplier has supplied within the last twelve months, if
> it hasn't, it will remove it's details. If it has, it will leave it as it
> was.
>
> I am using SQL Plus in Oracle 9i.
>
> The columns I have in my supplier table are as follows:
> SUPNO
> SUPNAME
> SUPADD
> SUPPCODE
> PAYTERMS
>
> I also have a table called PURORDERUNPRI where I can find out what suppliers
> have supplied to the company within the last year because it has the
> supplier number and the date of the order of each part. Here are the columns
> for this table:
> PARTNO
> PURORDERDATE (e.g. 21-jun-02)
> UNPRI
> SUPNO
>
> Any help on this would be great.
> Thanks.

Your description leaves much to be desired. What details are deleted?

Seems from this description, if they haven't supplied inthe last 12 months there would be no entry in the PURORDERUNPRI table in that time range. Are you looking to delete records older than 12 months? Or is there a details table that is missing from your description that has the data to delete?

You should also provide which version of ORACLE you use.

--
Ed Prochak
Magic Interface, Ltd.
440-498-3700(office)
Computer consulting, database and web services.
Received on Sat Jan 04 2003 - 09:22:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US