oracle concepts for you
Tuesday, 18 September 2012
Wizard Pages To Upload Data
In this topic, you create a series of wizard pages to upload data into the TASKS table.
Click
Create Page
.
Select the
Data Loading
page type and click
Next
.
Enter
Load Tasks
for Data Load Definition Name, select
TASKS
for Table Name, and select
TASK_ID
for Unique Column 1. Then click
Next
.
You have two lookups that you need to create. In the data file, you have the last name of the employee and so you need to do the lookup to the employees table to get the employee id. Select
ASSIGNED_TO
for Column Name, select
EMPLOYEES
for Table Name, select
EMPLOYEE_ID
for Column Name (of key value), and select
LAST_NAME
for Uploaded Column. Then click
Add
.
You also have to perform a lookup for the project. Select
PROJECT_ID
for Column Name, select
PROJECTS
for Table Name, select
PROJECT_ID
for Column Name, and select
PROJECT_NAME
for Uploaded Column. Then click
Add
.
Your lookups have been created. Click
Next
.
You want to create a rule that will change the Task Name to all uppercase. Select
TASK_NAME
for Column Name, enter
Upper Task Name
for Name and select
To Upper Case
for Type. Then click
Add
.
Click
Next
.
Accept the default pages that will be created and click
Next
.
You want to create a new tab. Select
Use an existing tab set and create a new tab within the existing tab set
and enter
Data Load
for the New Tab Label and click
Next
.
You need to specify which page to go to when you press Cancel. Select the List of Values icon.
You want to select the
3 Projects
page link.
Enter
3
for the Finish Branch to Page and click
Next
.
You are ready to create the Data Load Wizard pages. Click
Finish
.
Click
Run Page
.
Notice that you see the flow of the wizard on the left. The first wizard page is where you specify the Data Load Source. You want to upload a file with task data. Select
Upload file
for Import From and click
Browse
.
Select
tasks.txt
from the
/home/oracle/Desktop/solutions/apexp1_lab
directory and click
Open
.
The tasks.txt file is comma delimited so change the Separator to '
,
' (comma) and select the
Yes
checkbox for First Row has Column Names and click
Next
.
The Data / Table Mappings are displayed. Notice that the Column Name for the third column is not selected. This is because the name of the column in the file does not match the column in the database. Select the
COST
column from the pull down.
For the next column to the right, select the
BUDGET
column from the pull down.
Scroll to the right to make sure all the other columns are specified and click
Next
.
The Data Validation page is displayed. This page displays the data that will be inserted into the database. Notice that the lookups are applied so the PROJECT_ID rather than the PROJECT_NAME will be inserted and the EMPLOYEE_ID instead of the LAST_NAME will be inserted. In addition, the TASK_NAME was transformed to all Uppercase. Click
Load Data
.
Notice that 16 rows were inserted. Click
Finish
.
Notice that Page 3 is now displayed. Select the edit icon next to one of the Projects.
The tasks that you loaded are now displayed for this project. Click the
Application
button in the Developer Toolbar. In the next topic, you create and apply a List of Values (LOV) to some of the items on your page.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment