Home » Non-English Forums » Spanish » CONOCEN algun commano en CTL para subir una data especial en Oracle
icon5.gif  CONOCEN algun commano en CTL para subir una data especial en Oracle [message #169619] Thu, 27 April 2006 15:31 Go to next message
kespinoza97
Messages: 6
Registered: April 2006
Location: Panama
Junior Member
---CONTROL FILE (CTL) FOR LOAD FILE HL7
Hello sorry my english not is good.. but I have a situation my chain of data (FORMAT HL7)that I must raise in oracle this in a single block that contains several registries where the END of a registry says to me that ^M is the sign but the second following registry begins immediately and the CTL the taking like 1 single registry. Like doing so that the CTL sees that the sign ^M is the end of the 1 registry and inserts as a new registry the following chain of data successively.
**********************************
Example of the data to raise:
**********************************
ABC|DEFE|CGER^MEWR|WEI|URWRIEIR^M4234|234|324^M
**********************************
^M = END OF THE REGISTRY
fields terminated by ' | '
*** PLEASE HELP ME I HAVE THAT LOAD FILE EN FORMAT HL7 A TABLE OF ORACLE. CONTACT EMAIL kespinoza97@hotmail.com or Embarassed kespinoza97@yahoo.es
THANKS REGARDS,
K.ESPINOZA
TI-CHSF-PANAMA
CONOCEN algun comando en CTL para subir una data especial en Oracle [message #169625 is a reply to message #169619] Thu, 27 April 2006 15:45 Go to previous messageGo to next message
kespinoza97
Messages: 6
Registered: April 2006
Location: Panama
Junior Member
Hola a quien pueda ayudarme..
Tengo que subir una data a oracle que viene en este formato
**********************************
ABC|DEFE|CGER^MEWR|WEI|URWRIEIR^M4234|234|324^M
**********************************
explico:
1- me viene una sola cadena de texto ,todo pegado en el cual se encuentran varios registros.
2- el fin de cada registro me lo indica el signo ^M, porque el delimitador entre campos lo reconoce con el signo |.

Mi problema radica que :
* Tengo un archivo CTL que funciona bien y me sube la data pero me la sube como si fuera 1 registro , de tal forma que mi clt no reconoce que el simbolo de ^M es fin de registro para que cree un siguiente registro. y mi pregunta es que si alguien sabrá QUE INSTRUCCION DEBO AGREGAR EN MI CTL O QUE PUEDO HACER PARA QUE AL SUBIR ESTA DATA RECONOZCA QUE EL SIGNO ^M ES UN FIN DE REGISTRO..? .. AYUDA..
SI SABEN ALGO PLEASE kespinoza97@hotmail.com
Re: CONOCEN algun comando en CTL para subir una data especial en Oracle [message #169816 is a reply to message #169625] Fri, 28 April 2006 18:32 Go to previous message
Barbara Boehmer
Messages: 9077
Registered: November 2002
Location: California, USA
Senior Member
-- test.dat:
 
ABC|DEFE|CGER^MEWR|WEI|URWRIEIR^M4234|234|324^M


-- test.ctl:
load data
infile 'test.dat' "STR '^M'"
into table test_tab
fields terminated by '|'
(col1, col2, col3)


SCOTT@10gXE> create table test_tab
  2    (col1 varchar2(15),
  3  	col2 varchar2(15),
  4  	col3 varchar2(15))
  5  /

Table created.

SCOTT@10gXE> host sqlldr scott/tiger control=test.ctl log=test.log

SCOTT@10gXE> select * from test_tab
  2  /

COL1            COL2            COL3
--------------- --------------- ---------------
ABC             DEFE            CGER
EWR             WEI             URWRIEIR
4234            234             324

SCOTT@10gXE>

Previous Topic: Inicializacion de estructuras en Pro*c
Next Topic: Storing spanish data
Goto Forum:
  


Current Time: Mon Mar 18 22:44:03 CDT 2024