View previous topic :: View next topic
|
Author |
Message |
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
HI,
I would like to load a field of 35 characters with null value when there is space.
Currently i have a statement given below.
Load Data Resume Yes..INTO Table1
(Field1 position (1:20) Char nullif(1:40 = x'4040404040404040404040404040404040404040'))
I just want to know if there is any simplified code instead of having long code like (x'4040404040404040404040404040404040404040').
Thanks
Vijay |
|
Back to top |
|
|
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
DB2 utility throws syntax error when i continue that long hexadecimal value on 2nd line.
(Field1 position (1:40) Char
nullif(1:40 = '404040404040404040440404040404040-
4040404040404040404040'))
I tried hyphen also at 72nd byte as continuation character...but getting same syntax error.
Can anyone tell me how to resolve this issue?
Thanks
Vijay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Using the Code tag, post the actual sql being run and the disgnostic information generated. Copy/paste - do not re-type. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
cvijay784 wrote: |
DB2 utility throws syntax error when i continue that long hexadecimal value on 2nd line.
(Field1 position (1:40) Char
nullif(1:40 = '404040404040404040440404040404040-
4040404040404040404040'))
I tried hyphen also at 72nd byte as continuation character...but getting same syntax error.
Can anyone tell me how to resolve this issue?
Thanks
Vijay |
Is the column defined as nullable? |
|
Back to top |
|
|
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
Yes. Its a nullable field. |
|
Back to top |
|
|
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
I used spaces directly as given below instead of hexadecimal value. Load was successfull. Thanks.
(Field1 position (1:40) Char
nullif(1:40 = ' ')) |
|
Back to top |
|
|
|