This is a discussion on IMPORT ASC within the DB2 forums, part of the Database Server Software category; --> Hi! I'm using IMPORT FROM FILE OF ASC import command. The FILE rows of fixed length and also columns ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi! I'm using IMPORT FROM FILE OF ASC import command. The FILE rows of fixed length and also columns are of fixed length. In the FILE I have a date field that can have one special value (00000000) which should be interpreted as null. How do I specify that? Is it also possible to say "replace all space characters in strings with character F"? Best regards, Kovi -- -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ | Gregor Kovac | Gregor.Kovac@mikropis.si | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | In A World Without Fences Who Needs Gates? | | Experience Linux. | -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ |
| ||||
| Gregor Kovač wrote: > Hi! > > I'm using IMPORT FROM FILE OF ASC import command. The FILE rows of fixed > length and also columns are of fixed length. In the FILE I have a date > field that can have one special value (00000000) which should be > interpreted as null. How do I specify that? > Is it also possible to say "replace all space characters in strings with > character F"? > > Best regards, > Kovi With ASC format files, in order to import/load NULLs, you have to specify a character value that signifies null, as well as positional locations within the file for the null indicator. Of course, your file format must include these null indicators to be effective. The alternative, as Artur described, would be to import into a staging table and then use SQL modify the data during the insert to your "live" table. |