View previous topic :: View next topic
|
Author |
Message |
peeterparker
New User
Joined: 17 Nov 2006 Posts: 6
|
|
|
|
Hi,
I have to load a DB2 table, where in a particular has to be loaded with a vale KLS, so can I hard coded in the LOAD utility.
If yes how?
If no what's the procedure. I don't want to chabge the file which is being loaded. I just want to overwrite those values present in the load file.
thanks. |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Hi,
Code: |
where in a particular has to be loaded with a vale KLS |
after running load utility you can update the column by
Quote: |
UPDATE <TABLE>
SET FIELD = 'KLS'
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You could change the data in the file before you do the load.. |
|
Back to top |
|
|
peeterparker
New User
Joined: 17 Nov 2006 Posts: 6
|
|
|
|
Kiran and Scherrer,
Ya I am aware of those methods, the thing is that I don't want to do it when the load is done nor do I want to change the data in the file.
I want to carry it out during the load takes place, i.e., when we are loading some clomun say SQL_CODE POSITION(33:35) ________ , is their any possibility I could fill up the above blank so that I can load a value forcefully overwritting those in the file.
Peter. |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Check out LOAD option DEFAULTIF
Code: |
TRANSTAB POSITION( 31) CHAR(256) DEFAULTIF(TRANSTYPE='GG'
|
Above statement loads Default value of TRANSTAB column when TRANSTYPE is 'GG'. You can change default value of column to be what you want and depending on condition load default. |
|
Back to top |
|
|
|