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


Boffin Examples
 

The Dinosaur Database

 

Dino_Input_Example1.sql

/* 
This example takes an input for the date the record was last updated before running the query. The input field takes the form &Updated_On__DD_MM_YYYY where &Updated_On is the input field name and __DD_MM_YYYY denotes the type of input. To view the types of date input add __ (a double underscore) after a field name.
If you enter a date of 31/12/2004 you will get those records updated in 2005.
*/

Select 
DINOSAURS.DINO_NAME "Name",
DINOSAURS.PERIOD "Period",
DINOSAURS.UPDATE_DATE "Last Updated On"
From DINOSAURS
Where DINOSAURS.UPDATE_DATE >= to_date(&Updated_On__DD_MM_YYYY,'dd/mm/yyyy')
Order by DINOSAURS.UPDATE_DATE DESC;

 

The input field

&Updated_On__DD_MM_YYYY

has a name of

&Updated_On

 

plus a date input format attached denoted by the double underscore

 __DD_MM_YYYY

 

A range of over 50 formats are included and are selectable from a window when you append the double underscore to the field 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