Thread: Decode Not working
09-18-10, 13:00 #1Registered User
- Join Date
- Sep 2010
Unanswered: Decode Not working
I had a requirement of loading flatfile into staging table using SQL Loader, One of the columns in the the Flat file is having values FALSE or TRUE and my requirement is that I load 0 for FALSE and 1 for TRUE which can be achieved by simple DECODE function...I did use decode and tried to load several times but did not work. What might be the problem
INTO TABLE members
FIELDS TERMINATED BY "|"
status "decode(:staus, 'TRUE', '1','FALSE','0')"
I did try putting a trim as well as SUBSTR but did not work....the cloumn just doent get any values in the output (just null or say free space)
Any help would be great.....
09-18-10, 15:10 #2Registered User
Provided Answers: 1
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
Problem exists between Keyboard and chair.
1) missing comma after "Person_ID"
2) ":staus" should be ":status"You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.