Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
the discard file similar concept the bad file

The discard file simi-lar concept the bad file

,ch07.25656 Page 146 Wednesday, April 11, 2001 1:45 PM Chapter 7: Validating and Selectively Loading Data

146

Field conditions are written as part of a WHEN clause. The WHEN clause is part of your INTO TABLE clause and is table-specific. If you are loading multiple tables, you can specify different WHEN clauses for each table.

The syntax for the WHEN clause is as follows:

position := POSITION({start[{: | -}end])

The elements in the syntax are as follows:

condition
A WHEN clause can have any number of conditions ANDed together. Condi-tions may optionally be enclosed within parentheses.

string
A character string.

hex_digits
A string of hexadecimal digits.

This is the Title of the Book, eMatter Edition
Copyright © 2001 O’Reilly & Associates, Inc. All rights reserved.
147

Selectively Loading Data

The following LOAD statement provides an example of a WHEN clause. It loads feature names, but only for waterfalls located in Alger County:

LOAD DATA

(
state CHAR TERMINATED BY ',' ENCLOSED BY '"',
feature_name CHAR TERMINATED BY ',' ENCLOSED BY '"',
feature_type CHAR TERMINATED BY ',' ENCLOSED BY '"',
county CHAR TERMINATED BY ',' ENCLOSED BY '"'
)

It’s an unfortunate fact of life that you can only link field conditions together using the AND keyword. You can’t OR two conditions, nor can you use operators other than the ones used to test for equality and inequality.

This is the Title of the Book, eMatter Edition
Copyright © 2001 O’Reilly & Associates, Inc. All rights reserved.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Benjamin Lopez

PageId: ELI973000C