Re: Procedure

From: <rtproffitt_at_my-deja.com>
Date: Tue, 11 Jan 2000 00:58:18 GMT
Message-ID: <85dv72$361$1_at_nnrp1.deja.com>


Oliver,
I'm sorry to ask this, is this a real-life situation, or a classroom assignment?

Here are some general suggestions:

You can use the SUBSTR, TO_CHAR, and TO_NUMBER functions to extract the parts of the class code that you are interested in. For example, you could isolate the HAs and see if they are equal, or you could isolate the first digit and see if they are within a distance of 1. DECODE could also be used, for example, to convert the results to a 'YES' or 'NO', 'VALID' or 'INVALID', etc....

They could be used in a stored function to return yes or no if the classroom change is permitted. The Stored Function could be used in a Select statement...etc.

Or the cursor could return all rows,
and the if statement could check to see if conditions are passed, then update to the new class.

A Select statement could return those people with invalid classroom changes, etc.

If this is real-life, then describe a little more about what you wish to do, and I can give more details...

Good Luck,
Robert Proffitt

In article <85asdv$4u9$1_at_news.news-service.com>,   "Ollie" <hilol_at_multiweb.nl> wrote:
> Hi All
>
> My name is Oliver
>
> I am working on a program that checks if a class change for a student
is
> possible.I have this problem checking if the change is allowed.
> The two classes old and new has to be checked on schooltype
(4HA1),where HA
> is the schoolttype or the height of the class
> which may differ 1 down and one above (the 4 in this case) ,another
change
> which should be checked is for the same schooltype and height but to a
> different class like (4HA0 or 4HA5).
> My program get the records from a table one at a time using a
cursor.I am
> looking for a procedure to make this work.
>
> I hope someone can help me
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Jan 11 2000 - 01:58:18 CET

Original text of this message