Re: [HELP]: SQL code assistance
Date: 13 Oct 1993 05:45:00 GMT
Message-ID: <29g4ks$jb2_at_crcnis1.unl.edu>
Neil Greene <neil_at_kynug.org> writes:
>As a new Oracle sql writer, I was wondering if someone could pass along to
>me some sample code that will take a selection of multiple records and
>process them one at a time.
>I have Social Security numbers in two tables, TABLE-A and TABLE-B. I
>would like to scan the records in TABLE-B to a match in TABLE-A. Based on
>the result, I would like to do some processing, like: if match do this, if
>no match, add a new record.
Do you really want to this in SQL (ie, SQL*PLUS) or in PL*SQL? (The latter has many more language features, although no reporting capabilities.)
Before developing some example code, you may need to analyze your situation a bit more. As I see it, you have 3 possibilies:
X exists in Table B, but not in Table A.
X exists in both Table A and Table B.
X exists in Table A, but not in Table B. (Or is this unimportant?)
Also, is it possible for there to be multiple occurrences of X in either Table A or B?
Lastly, is the order in which rows are processed significant?
--- Michael Nolan, Sysop for the DBMS RoundTable on GEnie nolan_at_notes.tssi.com, dbms_at_genie.geis.com (posted from nolan_at_helios.unl.edu)Received on Wed Oct 13 1993 - 06:45:00 CET
