Hi All,
I am loading data to a child table from a text file. the text files
also contains data not referenced by parent key. while loading the data
if one row fails to satisfies the constraint everything is getting
rollback..
plz suggest me something.. which will help me to discard the
unsatisfied rows and continue with the rest..
My Query:
LOAD DATA CONCURRENT INFILE
'/remote/srm172/saranya/SOURCECOV/common_shell/output/data/common_shell_ex ec.dat'
INTO TABLE CS_COMMON_SHELL _EXEC_REG FIELDS TERMINATED BY '#'
(reg_id,func_ad dress);
Error Msg:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`sourcecov/CS_COMMON_SHELL _EXEC_REG`, CONSTRAINT
`CS_COMMON_SHEL L_EXEC_REG_ibfk _2` FOREIGN KEY (`func_address` )
REFERENCES `CS_COMMON_SHEL L_EXEC` (`func_address` ))
Thanks
Devi.
I am loading data to a child table from a text file. the text files
also contains data not referenced by parent key. while loading the data
if one row fails to satisfies the constraint everything is getting
rollback..
plz suggest me something.. which will help me to discard the
unsatisfied rows and continue with the rest..
My Query:
LOAD DATA CONCURRENT INFILE
'/remote/srm172/saranya/SOURCECOV/common_shell/output/data/common_shell_ex ec.dat'
INTO TABLE CS_COMMON_SHELL _EXEC_REG FIELDS TERMINATED BY '#'
(reg_id,func_ad dress);
Error Msg:
ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`sourcecov/CS_COMMON_SHELL _EXEC_REG`, CONSTRAINT
`CS_COMMON_SHEL L_EXEC_REG_ibfk _2` FOREIGN KEY (`func_address` )
REFERENCES `CS_COMMON_SHEL L_EXEC` (`func_address` ))
Thanks
Devi.
Comment