Home » SQL & PL/SQL » SQL & PL/SQL » URGENT!! URGENT!!
URGENT!! URGENT!! [message #190704] Thu, 31 August 2006 20:42 Go to next message
mad_bu
Messages: 8
Registered: August 2006
Junior Member
HI ALL,

I have a table called temp which has a data full of text which is delimited by ';' and whitespace. Data fields are split by ';' and last field is split by whitespace, Data is differentiated by the first field.and should be stored into multiple tables.


1) CREATE TABLE temp ( temp_data varchar2(4000) );

Table created.

2) SELECT temp_data FROM temp;TEMP_DATA
------------------------------------------------------
SERVER;psysadm-epm05b;EMM HerndonServers;epmfnmaro;
epmfnmarw;1691;UNIX;

ROUTER;1hca-r01-l0;3900;cisco7507_12.0(18)_ROUTER_CORP;vistaTest;private;NETWORK

....
etc...

My Intention is to store the data into table called servers table,routers table...etc...

Only servers data has a blank field at the end of each line with a delimiter ' ' .
so, can anyone help me to solve this Problem.
OUTPUT
======
SERVERS TABLE
============
SERVER TYPE VARCHAR2(64) NOT NULL, ----SERVER
SERVER NAME VARCHAR2(64) PRIMARY KEY,----psysadm-epm05b
GROUP VARCHAR2(64) ,------EMM Herndon Servers
SNMPRO PWD VARCHAR2(64),-----epmfnmaro
SNMPRW PWD VARCHAR2(64), -----epmfnmarw
SNMP PORTNO NUMBER(6), -----1691
PLATFORM VARCHAR2(16), -----UNIX
CUSTOMER VARCHAR2(64) ----WHITESPACE


OUTPUT same as server.....
------
ROUTER TABLE
--------------
ROUTER TYPE
ROUTER NAME
GROUP
DESCRIPTION
SNMPRO PWD
SNMPRW PWD
PLATFORM



Advance tx,
Madbu.

Re: URGENT!! URGENT!! [message #190706 is a reply to message #190704] Thu, 31 August 2006 21:03 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
For advice, you can have it good, fast or free; pick any two.
Re: URGENT!! URGENT!! [message #190714 is a reply to message #190706] Thu, 31 August 2006 23:13 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Or of course, you can have all 3, provided you don't ask for them Smile
Re: URGENT!! URGENT!! [message #190719 is a reply to message #190704] Thu, 31 August 2006 23:37 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Why not just dump the data to a flat file and load it with SQL*loader or an external table?
Re: URGENT!! URGENT!! [message #190722 is a reply to message #190719] Fri, 01 September 2006 00:07 Go to previous messageGo to next message
mad_bu
Messages: 8
Registered: August 2006
Junior Member
I could do IN SQLLDR but my data is of PRIMARY KEY AND FOREIGN KEY AND . My requirement is if a row is INSERTED,UPDATED,DELETED in the data table , all other tables are also should be updated accordingly. In the sqlldr I am not able to load data of PRIMARY KEY/FOREIGN KEY. Can u help me...

--Madbu.
Re: URGENT!! URGENT!! [message #190725 is a reply to message #190704] Fri, 01 September 2006 00:21 Go to previous messageGo to next message
mad_bu
Messages: 8
Registered: August 2006
Junior Member
I could do IN SQLLDR but my data is of PRIMARY KEY AND FOREIGN KEY AND . My requirement is if a row is INSERTED,UPDATED,DELETED in the data table , all other tables are also should be updated accordingly using pl/sql. In the sqlldr I am not able to load data of PRIMARY KEY/FOREIGN KEY. Can u help me...

--Madbu.
Re: URGENT!! URGENT!! [message #190728 is a reply to message #190706] Fri, 01 September 2006 00:45 Go to previous messageGo to next message
mad_bu
Messages: 8
Registered: August 2006
Junior Member
What do you mean by good,free and fast...
Re: URGENT!! URGENT!! [message #190742 is a reply to message #190728] Fri, 01 September 2006 01:51 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
It is because of your topic title. It doesn't look polite, it does not help (surely people will not drop anything they are doing, just because you have an urgent matter..) and it does not matter.
If it is urgent, YOU started too late. Not our problem.
Re: URGENT!! URGENT!! [message #190835 is a reply to message #190742] Fri, 01 September 2006 08:42 Go to previous messageGo to next message
joy_division
Messages: 4643
Registered: February 2005
Location: East Coast USA
Senior Member
Red alert!
Shields Up!
Re: URGENT!! URGENT!! [message #190867 is a reply to message #190704] Fri, 01 September 2006 11:12 Go to previous message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>What do you mean by good,free and fast...
The lack of planning on your part, does not necessarily constitute an emergency on my part.
Previous Topic: replacing certain characters in string
Next Topic: does not refresh the job automatically
Goto Forum:
  


Current Time: Thu Dec 08 18:35:08 CST 2016

Total time taken to generate the page: 0.08129 seconds