Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create temp table mytmptable
- (external_id char(10),
- int_id integer,
- cost_amount decimal(10,2)
- ) with no log;
- insert into mytmptable values
- ('7662', 232, 297.26);
- select * from mytmptable;
- insert into mytmptable values
- ('7662', 232, 297.26),
- ('7662', 232, 297.26);
- $ PREPARE p FROM "INSERT INTO mytmptable VALUES(?, ?, ?)";
- $ DECLARE c CURSOR FOR p;
- $ OPEN c;
- while (...there's more data to process...)
- {
- $PUT c USING :v1, :v2, :v3;
- }
- $ CLOSE c;
- insert into mytmptable
- select '7662', 232, 297.26
- union all
- select '7662', 232, 297.26;
- LOAD FROM "externalfile" INSERT INTO mytmptable;
- 7662|232|297.26|
- 7663|233|297.27|
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement