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

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



Sun, 02 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

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.

------

Quote:

> 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



Mon, 03 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

Quote:

> 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
-------------------------------------------------------------------


Mon, 03 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

Quote:

>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."



Sat, 08 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

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



Mon, 10 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

Quote:


>>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/



Mon, 10 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

Quote:


> >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.


Mon, 10 May 1999 03:00:00 GMT  
 Importing a text file - Smallctx.txt [01/01]

Quote:

>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



Mon, 10 May 1999 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. VB OLE to MS Word - code.txt [01/01]

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

3. VB OLE MS Word - code.txt [01/01]

4. Conversion vb3 > vb5 - news.txt [01/01]

5. HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!!! - vb.txt [01/01]

6. Read this pleeeeease (DLL problems) - vb.txt [01/01]

7. Problem(s) with vba2.dll - vb.txt [01/01]

8. OFFICIAL VB4.0 BUGLIST - aa.txt [01/01]

9. SetWindowsHookEx - winhook.txt [01/01]

10. Student Services System - dick.txt [01/01]

11. Connect report to recordset, not to table - crepor~1.txt [01/01]

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

 

 
Powered by phpBB® Forum Software