0
I need to download a file .txt
with multiple records for one table.
But this table contains a field (Seq
) that does not exist in the text file and this field should always be 1
and 2
. For example: the first imported record will be marked as 1
, the second as 2
, the third as 1
, the room as 2
, the fifth as 1
, so on and so forth.
They gave me the idea to do it using for
and if
, but I couldn’t.
Follow the command of the Loader:
load data
infile '/home/oracle/dados1.txt'
badfile '/home/oracle/exemplo3.bad'
discardfile '/home/oracle/exemplo3.dsc'
truncate
into table produtos
fields terminated by ","
( codigo, nome, seq, data_inclusao )