Home | Features | F A Qs | Download | Purchase | Links | Support | Contact us  


Boffin Examples
 

The Dinosaur Database

 

Dino_HTML_Email_Example1.sql

/* NOTE always precede the query with the Spool commands making the query the last part of each block. Terminate each query with a semicolon (;) */

/* The Email address below will send you a reply to confirm that it is working */

Emailto="test@boffin.org.uk"

-- there should be only one Email address. 
-- if there is more than one than the last one takes precedence.

/* the SpoolHTML filename should have the path and a prefix name e.g. the example below will create files C:\Temp\Period001.htm, C:\Temp\Period002.htm etc depending upon how many rows are returned */

SpoolHTML = "C:\Temp\Period"
Select 
DINO_PERIOD.PERIOD "Period",
DINO_PERIOD.PERIOD_DESCRIPTION "Description" 
From DINO_PERIOD 
Order by DINO_PERIOD.PERIOD;

SpoolHTML = "C:\Temp\Feeder"
Select 
DINO_FEEDER.FEEDER "Type of Feeder",
DINO_FEEDER.FEEDER_MEANING "Meaning" 
From DINO_FEEDER 
Order by DINO_FEEDER.FEEDER;

SpoolHTML = "C:\Temp\Dinosaur"
Select 
DINOSAURS.DINO_NAME "Name",
DINOSAURS.MEANING "Meaning",
DINOSAURS.PERIOD "Period",
DINOSAURS.LIVED "Lived",
DINOSAURS.FOUND "Found In",
DINOSAURS.BODY_LENGTH "Body Length (m)",
DINOSAURS.BODY_HEIGHT "Body Height (m)",
DINOSAURS.BODY_WEIGHT "Body Weight (kg)",
DINOSAURS.MOVED "Moves on",
DINOSAURS.FEEDER_TYPE "Type of Feeder",
DINOSAURS.FOOD "Eats",
DINOSAURS.DESCRIBED_BY "Described By",
DINOSAURS.YEAR_DESCRIBED "Year Described",
DINOSAURS.UPDATE_DATE "Last Updated On"
From DINOSAURS
Order by DINOSAURS.PERIOD,
DINOSAURS.DINO_NAME;

 

To return to the list of examples click here
 


Copyright © Boffin Associates, 2005
Oracle® is a registered trademark of the Oracle Corporation 
Microsoft®,  Excel®  and Access® are registered trademarks of Microsoft Corporation