Over 10 Million Study Resources Now at Your Fingertips


Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Language:EN
Pages: 2

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.
How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Payment
Make payment
Document download
Download File
PageId: ELI973000C
img
Uploaded by :
AKAjqQXJ
Page 1 Preview
the discard file similar concept the bad file
Sell Your Old Documents & Earn Wallet Balance