Home » RDBMS Server » Server Utilities » sql*loader (Oracle 9i)
sql*loader [message #324981] Wed, 04 June 2008 12:31 Go to next message
binho_sjc
Messages: 8
Registered: April 2007
Junior Member
Hi everybody
I have a .txt file and I want to import this file into a table.
That table has some not nullable columns, but those columns dont exist on the txt file.
How could I load default values on the table if I dont have these values on the file?
Above is the ctl file. Like I told, the last seven columns are not on the txt file (they are : CONFIRMADO,M1,T1,M2,T2,M3,T3) and I want to load default values to them (G,N,N,N,N,N,N).
Sorry about english.
Hugs to everybody .

Robson

Load Data
infile 'C:\Sistemas\VirtualEduca\Loader\carga\comunicacao_oral.txt'
badfile 'C:\Sistemas\VirtualEduca\Loader\BAD\comunicacao_oral.BAD'
append
into table tb_carrega_ve_cadastro
fields terminated by ';'
trailing nullcols
(
INSCRICAO
,CPF
,PASSAPORTE
,NOME
,NOME_CRACHA
,SEXO
,ENDERECO
,CIDADE
,ESTADO
,CEP
,PAIS
,TELEFONE
,CELULAR
,NECESSIDADE
,TIPONECESSI
,EMAIL
,DTNASC
,EMPRESA
,CARGO
,PROFESSOR_REM
,MATPMSJC
,HTC
,CM01
,CM02
,CM03
,CM04
,CM05
,CM06
,CM07
,CM08
,CM09
,CM10
,CM11
,CM12
,CM13
,CM14
,CM15
,CM16
,CM17
,CM18
,CM19
,CM20
,CM21
,CM22
,CM23
,CM24
,CM25
,CM26
,CM27
,CM28
,CM29
,CM30
,CM31
,CM32
,CM33
,CM34
,CM35
,CM36
,CM37
,CM38
,CM39
,CM40
,CM41
,CM42
,CM43
,CM44
,CM45
,CM46
,CM47
,CM48
,ATIVO
,DTINSCRICAO
,CONFIRMADO "G"
,M1 "N"
,T1 "N"
,M2 "N"
,T2 "N"
,M3 "N"
,T3 "N"
)







Re: sql*loader [message #324983 is a reply to message #324981] Wed, 04 June 2008 12:34 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

can you change the table definition to include the default values; at least while the load occurs?
Re: sql*loader [message #325041 is a reply to message #324983] Wed, 04 June 2008 21:46 Go to previous message
Barbara Boehmer
Messages: 9094
Registered: November 2002
Location: California, USA
Senior Member
,CONFIRMADO CONSTANT "G"
,M1 CONSTANT "N"
,T1 CONSTANT "N"
,M2 CONSTANT "N"
,T2 CONSTANT "N"
,M3 CONSTANT "N"
,T3 CONSTANT "N"

[Updated on: Wed, 04 June 2008 21:47]

Report message to a moderator

Previous Topic: export time
Next Topic: SQL Loader
Goto Forum:
  


Current Time: Fri May 17 04:31:47 CDT 2024