Download the file

Transcript
collector starn with any upper or lower case combination of 'Chapr'.
select max(LENGTH(description» from lIucexp.xsources;
tells you what the maximum length of the entries in the description field of the NUCEXP
XSOURCES table is.
select *from fllCctJllllog
where LOWER(owner) ='geodx'j
returns all tables and views belonging to the GEODX database to which you have access, no
matter whether the word GEODX is in the database in upper or lower case.
select * from paleo. store
where SUBSTR(re/nO,1,3) ='MFP'j
retrieves the storage records for all microfossil specimens in the PALEO database whose
identifier (refno) starts with the three letters MFP.
select * from nucexp.explosions
where UPPER(site) ='URAL';
will retrieve all the explosions from the Nuclear Explosions Database which were detonated in
the Ural Mountains, no matter whether the site name is in the database in upper or lower case.
3. Conversion functions
To perform operations on field values which can be null, the NVL function may be used to
substitute a value for all nulls. For instance,
update temp_tIetoils set m_1IUlX =
GREATEST(NVL(mb_lIver,O),NYL(ms_tner,O),NYL(mCtner,0»;
is part of the command the staff at the Australian Seismological Centre use to update the
maximum magnitude (field mJnax) to the greatest value of all the different magnitude
determinations. In this case, mb_aver,ms_aver and mCaver are assigned a value of 0 if the field
is null. This example also shows the use of the GREATEST function. The corresponding
function for the smallest value is LEAST.
© Australian Geological Survey Organisation 1993 - AGSO Oracle Users Guide Appendix D
3