How to read a text format table into a table in database?

How to read a text format table into a table in database?

Post by InterF » Sat, 19 Jan 2002 17:44:41



I want to find a universal program which can read a text format table
into a table
in database. The format of the text table is not very normal. For
example:

IMSIS            M                   NA  ANRES

20205            5-3094              4   OBA-30
                                         BO-30
                                         MAPVER-1
                                         CBA-30
                                         CBAZ-30
4600000012       5-86139             4   OBA-25
                                         BO-25
                                         OWNMS
                                         NATMS
                                         MAPVER-2
                                         CBA-86
                                         CBAZ-86
                                         CAMEL-2

There OBA,OWNMS are also fields of the table in database.

Best Regards,
Chuan He

 
 
 

How to read a text format table into a table in database?

Post by Joerg Schmitz-Linnewebe » Mon, 21 Jan 2002 17:53:17



> I want to find a universal program which can read a text format table
> into a table
> in database. The format of the text table is not very normal. For
> example:

> IMSIS            M                   NA  ANRES

> 20205            5-3094              4   OBA-30
>                                          BO-30
>                                          MAPVER-1
>                                          CBA-30
>                                          CBAZ-30
> 4600000012       5-86139             4   OBA-25
>                                          BO-25
>                                          OWNMS
>                                          NATMS
>                                          MAPVER-2
>                                          CBA-86
>                                          CBAZ-86
>                                          CAMEL-2

> There OBA,OWNMS are also fields of the table in database.

> Best Regards,
> Chuan He

Seems like a job for an *awk* script (at least the disecting of the orig.
text file). If you are not very familiar with awk, I would suggest to have
a look at the IBM developer zone for Linux:
http://www-106.ibm.com/developerworks/linux/
There are a lot of articles written by "Daniel Robbins" and esp. one is
titled something like "Common threads: Programming with awk". In this
article (series) he uses an simillar setup as an example.

HTH. Salut, J?rg

--
J?rg Schmitz-Linneweber
gpg/pgp key id: 0x146428F1
ASTON GmbH, Ruhrorter Stra?e 9, 46049 Oberhausen, Germany
Tel. +49 (208) 6201930, FAX +49 (208) 6201950,
http://www.aston-technologie.de

 
 
 

How to read a text format table into a table in database?

Post by Dave Beye » Tue, 22 Jan 2002 19:38:02


        In Article 128335 of comp.unix.programmer, Joerg Schmitz-Linneweber



> > I want to find a universal program which can read a text format table
> > into a table in database. The format of the text table is not very
> > normal. For example:

> > IMSIS            M                   NA  ANRES
> > 20205            5-3094              4   OBA-30
> >                                          BO-30
> > . . .
> >                                          CBAZ-30
> > 4600000012       5-86139             4   OBA-25
> >                                          BO-25
> > . . .
> >                                          CAMEL-2

> > There OBA,OWNMS are also fields of the table in database.
> > Chuan He

        It would be very helpful if you would give more details
about the format of your input file, e.g. what is used as the
field separator, line separator, and what database format you
want to import into.  awk is a likely candidate for such a task
but we cannot assist you because you haven't provided adequate
information:

  1.  What databse tool is being used and what is the
      input format it expects?

  2.  You indicate OBA and OWNMS are fields of the databse but
      what is expected of them?

  3.  Provide examples of not only the input but also the output.

In addition to the link posted, you could also try posting to
comp.lang.awk.  Be sure when you post to include the above
indicated information otherwise you may not get any answers or
the answers will be requesting more inforamtion.

                                        Dave

 
 
 

1. where are process-table, region-table, inode-table?

Hi,
        Can anyone tell me where I can change the text table (the max # of
executable that a system can run at any time) , region table , inode tables
and file table? I want to tune my kernel a bit, since it's running slow
w/ my 486 8M.. somehow the kernel is taking more than 10% of my total memory
(624k for kernel code, 384k reserved, 376k data).... leaving me enough to
barely run a X... I read a book called "System Tuning" (base on System V)
which mentioned something about changing the text table , region table,
inode tables anf file table to tune the system. Anyone know where I should
change these defaults? Anyone think that the kernel configuration script
should allow us to estimate the # of users our system will be serving..and
then calculate(estimate) the size of these tables? Does these tables
exist in Linux?

Please enlighten me..

TIA

Dan

2. Front Page Extensions

3. C programming Error : Assertion failed: table->edgeH == VL_EDGE_NO_WRITE || table->edgeH == VL_EDGE_ZERO_FILL || table ?

4. Now that I've got things running....

5. local table v/s main table

6. Core from top-3.3beta (compiled using gcc and solaris-2.4)

7. Proc table and file table

8. All I need is a list? Is that TOO hard to provide me??????? H

9. iptables v1.2.2: can't initialize iptables table `filter': Table does not exist

10. LILO- fix-table, ignore-table, and 1024 cyl.

11. Synchronising DHCP tables with DNS tables

12. How Do Routing Table Entries Get Added to Routing Table at Bootup?

13. How to set up routing table or gateway tables for ppp?