在使用DB2装载数据时,经常会有记录会被莫名其妙的拒绝,查看del文件内容,发现按照逗号分隔符计算域时,域往往会变少。因此,推测DB2导出的数据中存在换行符的情况。处理办法:db2
"load from /DATA/TBL_WEB_MCHNT_QUERY.del of del modified by
delprioritychar messages msg.lo...(more)
近段时间需使用spool、sqlldr来处理数据,过程是相当的痛苦,以下是这次的总结:spool时应尽最大可能限定字段的格式,如字段里有换行符、有与字段封装符相同的字符一定要注意转换;例:1、spool文件(spool_staff.sql)如下:column name new_value file_nameselect 'D:\exp_data\portal\G...(more)
今天在看OCP题库的时候有一道题是考字段约束的,意思是要在表CUSTOMERS的字段CUST_FIRST_NAME建个约束,使这个字段不能输入数字。View the Exhibit and examine the description of the CUSTOMERS table.You want to add a constraint on the CUST_FIRST_NAME column of the...(more)