Re: SQLLDR syntax question

From: Kay Kanekowski <kay.kanekowski_at_web.de>
Date: Mon, 8 Mar 2010 06:56:33 -0800 (PST)
Message-ID: <b2045327-a7f1-4236-b322-480cafabf52f_at_b7g2000yqd.googlegroups.com>



Hi Martin,
you need a function that calculate your "string" data. That's my try:

create or replace function fn_kk_calc ( string_in IN varchar2 ) return number
is
 erg number;
begin
 execute immediate 'select ' || string_in || ' from dual' into erg;  return erg;
end;
/

LOAD DATA
INFILE math.txt
INTO TABLE kk_math
REPLACE
FIELDS TERMINATED BY ','
       OPTIONALLY ENCLOSED BY '"'
(
  id1 integer external "fn_kk_calc(:id1)",   id2 integer external
)

hth
Kay Received on Mon Mar 08 2010 - 08:56:33 CST

Original text of this message