Importing a text file - Smallctx.txt [01/01]

Importing a text file - Smallctx.txt [01/01]

Post by David Lisogurs » Thu, 14 Nov 1996 04:00:00



I need to import a large delimited text file so that I can sort the data and
manipulate it.  I haven't had any luck so far, so I decided to do it
line-by-line using Line Input #1 and parsing each line.

Needless to say, this is VERY time consuming, so I was hoping
someone out there could help me out.

The real file is a few MB, but I am attaching a few lines.  Can someone
help?

begin 644 Smallctx.txt
<uuencoded_portion_removed>

`
end

Thanks,

-David Lisogurski

 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by Dag Sund » Fri, 15 Nov 1996 04:00:00


I made a text-file of your sample, and used the import function of
Access.

it took only seconds to do it from scratch both in 2.0 and 7.0, so...

is your problem to do it programmatically?

Dag.

------


> I need to import a large delimited text file so that I can sort the data and
> manipulate it.  I haven't had any luck so far, so I decided to do it
> line-by-line using Line Input #1 and parsing each line.

> Needless to say, this is VERY time consuming, so I was hoping
> someone out there could help me out.

> The real file is a few MB, but I am attaching a few lines.  Can someone
> help?

> 1996-10-11 09:06:10|24|1|IPROS2|IPROS2|64VCaporale|r64rsingh|station20|5193768436|213|5193768436|75|7|9| | | |RBTS7_CB|
> 1996-10-11 09:06:18|26|100|IPROS2|IPROS2|64VCaporale|r64jkakam|station18|7057324075|191|7057324075|16|10|7| | | |RBTS7_CB|
> 1996-10-11 09:06:18|24|4|IPROS2|IPROS2|64VCaporale|r64jkakam|station18| | |9058396358|0|7|8| | | |RBTS7_CB|
> 1996-10-11 09:06:22|24|1|IPROS2|IPROS2|67Saturns|r65scolli|station56|5193763842|199|5193763842|22|7|9| | | |RBTS7_CB|
> 1996-10-11 09:06:28|27|0|IPROS2|IPROS2|64VCaporale|r64jkakam|station18|9058396358| | |10|8|9| | | |RBTS7_CB|
> 1996-10-11 09:06:29|26|100|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12|5198696595|326|5198696595|37|10|7| | | |RBTS7_CB|
> 1996-10-11 09:06:29|24|4|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12| | |4162931963|0|7|8| | | |RBTS7_CB|
> 1996-10-11 09:06:30|25|0|IPROS2|IPROS2|64VCaporale|r64nmclel|station73|5194212053|328|5194212053|205|9|10| | | |RBTS7_CB|

> Thanks,

> -David Lisogurski


 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by Paul Sampso » Fri, 15 Nov 1996 04:00:00



> I need to import a large delimited text file so that I can sort the data and
> manipulate it.  I haven't had any luck so far, so I decided to do it
> line-by-line using Line Input #1 and parsing each line.
> Needless to say, this is VERY time consuming, so I was hoping
> someone out there could help me out.
> The real file is a few MB, but I am attaching a few lines.  Can someone
> help?
> 1996-10-11 09:06:10|24|1|IPROS2|IPROS2|64VCaporale|r64rsingh|station20|5193768436|213|5193768436|75|7|9| | | |RBTS7_CB|
> 1996-10-11 09:06:18|26|100|IPROS2|IPROS2|64VCaporale|r64jkakam|station18|7057324075|191|7057324075|16|10|7| | | |RBTS7_CB|
> 1996-10-11 09:06:18|24|4|IPROS2|IPROS2|64VCaporale|r64jkakam|station18| | |9058396358|0|7|8| | | |RBTS7_CB|
> 1996-10-11 09:06:22|24|1|IPROS2|IPROS2|67Saturns|r65scolli|station56|5193763842|199|5193763842|22|7|9| | | |RBTS7_CB|
> 1996-10-11 09:06:28|27|0|IPROS2|IPROS2|64VCaporale|r64jkakam|station18|9058396358| | |10|8|9| | | |RBTS7_CB|
> 1996-10-11 09:06:29|26|100|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12|5198696595|326|5198696595|37|10|7| | | |RBTS7_CB|
> 1996-10-11 09:06:29|24|4|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12| | |4162931963|0|7|8| | | |RBTS7_CB|
> 1996-10-11 09:06:30|25|0|IPROS2|IPROS2|64VCaporale|r64nmclel|station73|5194212053|328|5194212053|205|9|10| | | |RBTS7_CB|

Why reinvent the wheel?

Use Excel.

Or import into a table (this *is* a database group) and use a
query to sort it the way you want it.

Or pass it across to a unix system and use "sort -t\| +N +M ...."
where N, M ... are the (1-based) numbers of the columns you want
to sort by.

Quote:> ...

--
-------------------------------------------------------------------

BB 74 A4 EF 03 F8 44 C1 F3 75 FE C6 7E F9 6E 43         --- at home
-------------------------------------------------------------------
 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by John Woo » Wed, 20 Nov 1996 04:00:00



>I need to import a large delimited text file so that I can sort the data=
 and=20
>manipulate it.  I haven't had any luck so far, so I decided to do it=20
>line-by-line using Line Input #1 and parsing each line.

>Needless to say, this is VERY time consuming, so I was hoping
>someone out there could help me out.

>The real file is a few MB, but I am attaching a few lines.  Can someone
>help?

David,
You can ATTACH a text file to Access and then deal with it just as you
would any "normal" table (i.e. SQL Appends, Queries, etc.).  If sorting =
is
all you really need to do, why not try using Excel as an OLE object, open
the file (as a worksheet), sort, then save.=20
I have done both, if you need a code sample let me know.
--
John Wood
Manager, Database Administration
VWR Scientific Products
West Chester, PA
610-429-2840

   "Nearly all men can stand adversity,
   but if you want to test a man's character,give him power."

 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by David Lisogurs » Fri, 22 Nov 1996 04:00:00


Quote:>> 1996-10-11 09:06:10|24|1|IPROS2|IPROS2|64VCaporale|r64rsingh|station20|5193768436|213|5193768436|75|7|9| | | |RBTS7_CB|
>> 1996-10-11 09:06:18|26|100|IPROS2|IPROS2|64VCaporale|r64jkakam|station18|7057324075|191|7057324075|16|10|7| | | |RBTS7_CB|
>> 1996-10-11 09:06:18|24|4|IPROS2|IPROS2|64VCaporale|r64jkakam|station18| | |9058396358|0|7|8| | | |RBTS7_CB|
>> 1996-10-11 09:06:29|26|100|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12|5198696595|326|5198696595|37|10|7| | | |RBTS7_CB|
>> 1996-10-11 09:06:29|24|4|IPROS2|IPROS2|64VCaporale|r64gjayaw|station12| | |4162931963|0|7|8| | | |RBTS7_CB|
>Why reinvent the wheel?

>Use Excel.

>Or import into a table (this *is* a database group) and use a
>query to sort it the way you want it.

I've tried importing it into a table, but I think my SCHEMA.INI must be wrong,
because it's not working.  If anyone can get the above text file to import
into a table (or attach to it), I'd LOVE to see the code and SCHEMA.INI

Thanks,

-Dave

 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by Jeff Fiel » Fri, 22 Nov 1996 04:00:00




>>I made a text-file of your sample, and used the import function of
>>Access.

>>it took only seconds to do it from scratch both in 2.0 and 7.0, so...

>>is your problem to do it programmatically?

>>Dag.

I posted your answer previously:  Ole to Access use the
DoCmd.TransferText or develop your own code to import each line from
the file and insert the values into your table.  OLE is much easier to
program, but the user must have Access installed on their machine.  

However, you have inconsistent data fields in you lines of text and
your date and time should be in their own field to be atomic.

Jeff Fields


http://lonestar.texas.net/~jkfields/

 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by Greg Payn » Fri, 22 Nov 1996 04:00:00




> >I made a text-file of your sample, and used the import function of
> >Access.

> >it took only seconds to do it from scratch both in 2.0 and 7.0, so...

> >is your problem to do it programmatically?

> >Dag.

> You're exactly right.  I need to do it from a VB4 program, and I can't
> import or attach the text file, probably due to a bad SCHEMA.INI

> Can you (or anyone) help?

> -Dave

Hi Dave
        I import text files all the time into access tables.  The way I
do it is to read in the text file line by line using the line input
function and then break the text record into  vb variables. I have the
text file open for input and the database table open.  I then transfer
the Vb variables into the database fields and do an addnew and update
command.
                                Hope this helps.
 
 
 

Importing a text file - Smallctx.txt [01/01]

Post by David Lisogurs » Fri, 22 Nov 1996 04:00:00



>I made a text-file of your sample, and used the import function of
>Access.

>it took only seconds to do it from scratch both in 2.0 and 7.0, so...

>is your problem to do it programmatically?

>Dag.

You're exactly right.  I need to do it from a VB4 program, and I can't
import or attach the text file, probably due to a bad SCHEMA.INI

Can you (or anyone) help?

-Dave

 
 
 

1. Not a DBF file - save.txt [01/01]

BEGIN -- Cut Here -- cut here
Does anybody have some suggestions on how I can fix DBF files when you get the
message not a DBF file.  I have written a cross platform Mac and Ibm.  Two of the MAC
have had fragmented disk.  This cause the dbf to be damage.  Does anybody have any
idea of what I can do to fix these files.

Thanks for you help
Bev Scott
END -- Cut Here -- cut here

2. OAS408: wrks.exe crashes

3. Illustra protection - includi.txt [01/01]

4. Execution hangs, when Pkg is scheduled (MS-SQL 7)

5. Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelp - vb.txt [01/01]

6. Codebase++ info

7. **MAKING MONEY FOR YOU OWN DATABASE - a.txt [01/01]

8. Software Consultant job opening in Bay Area (California)

9. Foxpro 2.6 printing problem in Windows 95 - fox_ques.txt [01/01]

10. .WAV as BLOBs in Paradox tables - wav-db.txt [01/01]

11. Putting Text into Grid - dbase.nx [01/01]

12. 8.1.7 install problems on Sun Blade 100/Solaris 8 01/01 MU4

13. problems with online 5.01.UD2 together with I-STAR TCP/IP 5.01.UD3