How can I import CSV with Carriage Return?

Hi, I have a set of comma delimited values in a text file.  They import
fine.  However, they are all in one record.  How can I get each value
on one record?  For example, say I have:

toys, books, shoes, houses

If I import, I get them all on one row.

I want each one on a separate row:

toys
books
shoes
houses

Any ideas?

Thanks for any help.

0
3/10/2006 3:38:38 AM
comp.databases.ms-access 42535 articles. 0 followers. Post Follow

2 Replies
650 Views

Similar Articles

[PageSpeed] 22

On 9 Mar 2006 19:38:38 -0800, needin4mation@gmail.com wrote:

You would have to process this file using regular file i/o functions
such as Open, Line Input #, etc., and then add each word to the table
using an Append query or a recordset.AddNew.

-Tom.


>Hi, I have a set of comma delimited values in a text file.  They import
>fine.  However, they are all in one record.  How can I get each value
>on one record?  For example, say I have:
>
>toys, books, shoes, houses
>
>If I import, I get them all on one row.
>
>I want each one on a separate row:
>
>toys
>books
>shoes
>houses
>
>Any ideas?
>
>Thanks for any help.

0
3/10/2006 4:05:03 AM
You can use File I/O as Tom suggests or you can import to a table and then
open a recordset on the imported table and run through the fields apending
the values to your target table then drop the imported table.

e.g. Where the imported text file is in table MyText the target table is
MyTarget the Target field is MyTargField

Using DAO
    dim db as DAO.Database
    dim rsSce as DAO.Recordset
    dim rsTarg as DAO.recordset
    dim fldSce as DAO.Field

    set db = Currentdb

    set rsSce = db.Openrecordset(SELECT * FROM MyText)
    set rsTarg = db.Openrecordset(SELECT * FROM MyTarget)

    with rsSce
        Do Until .EOF
            for each fldSce in .Fields
                rsTarg.AddNew
                rsTarg.Fields(MyTargField) = fldSce.Value & ""
                rsTarg.UpDate
            Next
            .MoveNext
        Loop
        .Close
    End With

    rsTarg.Close

    Set rsSce = Nothing
    Set rsTarg = Nothing
    Set db = Nothing

-- 

Terry Kreft


<needin4mation@gmail.com> wrote in message
news:1141961918.050391.292160@u72g2000cwu.googlegroups.com...
> Hi, I have a set of comma delimited values in a text file.  They import
> fine.  However, they are all in one record.  How can I get each value
> on one record?  For example, say I have:
>
> toys, books, shoes, houses
>
> If I import, I get them all on one row.
>
> I want each one on a separate row:
>
> toys
> books
> shoes
> houses
>
> Any ideas?
>
> Thanks for any help.
>


0
terry.kreft (988)
3/10/2006 11:50:48 AM
Reply:

Similar Artilces:

Import MS Office Excel Comma Separated Values Files into a MS Access 2003 database
Hi, I have been tasked with Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database. These files were exported from a DB2 database.I have also been given the DDL code. I have Googled a solution to this task and have tried creating these tables using the DDL code in a query within a blank MS Access database. Is there a more expedient way to achieve this? I noticed, for example, that a field in DB2 has a data type of "decimal" while the same field would have the data type of "number". Thanks, Zuf What follows is the DDL: -------...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

Importing data from an Excel spreadsheet into an MS Access database
I need to import data from a spreadsheet that is created new every day into an MS Access database. The data is in a workbook consisting of multiple work sheets. I plan to import using the TransferSpreadsheet method. The name of the spreadsheet will change every day, but the position of the data to be imported will always be the same. Here is my problem: Having never used this method before, I am unsure as to what to put in the Range parameter. The Range is (let's say) B26:L26 in a sheet labeled "TodayData". How would I put that in the Range parameter? Help in VBA only sh...

Can I read MS Access database on Android notepad?
I'm about to dive into the wonderful world of notepads so I can carry something small & light for a long overseas trip. All I *really* need to do with it is read my email, but I'd really love to be able to take a couple of fairly large (10 & 15GB) relational databases created in Access 2000--don't need to update them on the notepad, or sync them with my Win 7 desktop, just be able to open the .mdb files and read them on the Android device. -- -------------------------------------------- Dick Baker (contact via http://goon.org/contact.php)...

How to import a tab delimited text file into MS Access database
Hi, I have the following task to be done in VC++ 6.0. I have a tab delimited text file that needs to be imported into a MS Access table. The table is created and the table structure is defined using DAO methods. So now I have to fill this table with the data in the text files. For a few rows in the text file, the number of columns could be less than the number of columns in the table. Can anyone please post me the code to do this. Thanks a ton in advance. Pradeep wrote: > I have the following task to be done in VC++ 6.0. We'd be happy to give you the VBA code, but do you really want to throw away your C++ and use Microsoft Access for the job? If you want to keep C++, you can ask for C++ code in another newsgroup, because we'd just be guessing. -- Message posted via http://www.accessmonster.com ...

MS Access
Hi, I have a database in MS Access 2007, multiuser set up, however only one person can get into the database at a time. Thanks in advance for your help. Trish Trish wrote: > Hi, > > I have a database in MS Access 2007, multiuser set up, however only > one person can get into the database at a time. > > Thanks in advance for your help. > > Trish Do you have /excl in the command line to open the database. Is the second user getting an error message? You might want to be a little more verbose in your problem description...like error messages, method of opening the file, and the like. Hi, Trish wrote: > I have a database in MS Access 2007, multiuser set up, however only > one person can get into the database at a time. Check the users rights, they must have the right to create and delete files in the database folder. Regards Jens On May 12, 2:31=A0pm, Salad <o...@vinegar.com> wrote: > Trish wrote: > > Hi, > > > I have a database in MS Access 2007, multiuser set up, however only > > one person can get into the database at a time. > > > Thanks in advance for your help. > > > Trish > > Do you have /excl in the command line to open the database. > > Is the second user getting an error message? =A0You might want to be a > little more verbose in your problem description...like error messages, > method of opening the file, and the like. I will double-check the command l...

Can MS-Access queries join against a VBA function that returns a Recordset?
I'm coming from a MS-SQL Server background, and I'm accustomed to writing stored procedures that mix programming logic and SELECT statements to create a final recordset which is the return value of the stored procedure. I often write queries that JOIN against the stored procedure name, as if the stored procedure were a table. Is there anyway to simulate this same thing in Access 2003? Can a VBA function return a DAO Recordset and can my Access query then refer to that VBA function by name in a JOIN? Thanks, Allen ...

Importing MS Access data into MS Word
In the thread "combining multiple address fields into 1 address field", Stuart (?) helped solve that problem. I then tried to set up a mail merge in Word to check how I could use and merge the data. I found the database tool bar and opened the appropriate database - but... I could not find a way to open a particular table or query in order to insert the fields from the query into Word. The procedure I followed was this: - open a blank word .doc - from the database tool bar selected "insert database" - a window opened, headed 'Database' and divided into 3 section: at the top a section titled "data source", a middle section titled "data options", a bottom section titled "insert the data into the document" - "under "data source" I clicked "get data" - a window headed 'Select data source' opened - I navigated to the relevant database (mobmem07.mdb) and selected it. - this added the database location to the "data source" part of the 'database' window - I then looked at the "query options" section I found I could not select a table or query from within the database I had opened. Word had merely defaulted to opening one of the two tables in it. The only querying I could do was on the table it had loaded from the functions Word provided. I could not find a way to open any other table let alone a query. Moreover, I couldn't see a wa...

MATLAB command to access MS Access database
Hi! Is there a MATLAB command which gives access to a .mdb MS Access database or do I need a special driver? Thanks, Andree Hi Andree Ellert, you can use activeXcontrol to interact with MS-Access database. access = actxserver('Access.Application'); returns the handle for Access. set(access, 'Visible', 1); will show the opened Access window. use get(access) and set(access) commands to find the methods available to call. -Vadivelu M =========== http://www.mathworks.com/access/helpdesk/help/toolbox/database/datatool.shtml "Andree Ellert" <ellert@gmx.net/////\\\\\> wrote in message news:eed9874.-1@webx.raydaftYaTP... > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree Andree Ellert wrote: > > > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4045&objectType=file> -Hardik ...

request for explanation on access an database in ms access
This is the code that I found on the internet for accessing an ms access database: import java.sql.*; class Test { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // set this to a MS Access DB you have on your machine String filename = "d:/java/mdbTEST.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end // now we can get the connection from the DriverManager Connection con = DriverManager.getConnection( database ,"",""); } catch (Exception e) { System.out.println("Error: " + e); } } } What I don't understand is the declaration of database. What I did was putting the database in the same dir as the sourcecode and use "jdbc:odbc:CafeJolt.mdb". But this doesn't work. And the above code does, why is that??? Actually it's not Java question. It's ODBC question. You have to have ODBC connection. Depending of Windows it's usually something like this (for my Windows 2000): Start->Sttings->Control Panel->Administartive Tools->Data Sources(ODBC)-> User DSN -> [Add]-> Driver to Microsoft Access(*.mdb) === And here, finally you can choose file name. ...

Access MS-ACCESS database on server from client????
I m currently developing a java based application and want to know how can i make client access database located on the server? "HeMan_Speaks" <Lunar20092010@gmail.com> wrote in message news:d71ce567-0434-48b8-b1d2-bb191706ab45@w8g2000prd.googlegroups.com... >I m currently developing a java based application and want to know how > can i make client access database located on the server? I think you're going to have to expand a little bit more in your question here, as is not 100% quite clear what you're trying to do. You might want to make a little bit of a distinction between MS access, the development system that allows you to write code, build forms, and build reports, and that of the database engine that you choose to use with MS access. When you build an application MS access, you then choose your database engine, that might be oracle, SQL server, or perhaps more often leave the default jet database. So when you say make a client access application, are you talking about a piece of software that you plan to install and each computer? The fact that your introducing the issue of java further complicates your question. Perhaps your question is simply you have some java code running on a server, and with to open a mdb file (an access database file). In this situation you're not really using MS access at all here (you using what is called the jet database engine to read that mdb file). For all the trouble in this type of sce...

RE: How can I access data from MS Access?
Peter, I sadly admit that I was wrong. "Doesn't seem to work" is effectivly even more useless than "doesn't work". I give up. Years ago we used to get our FORTRAN card decks back from the DP center with a piece of scrap paper saysing "She No Work". top that. On 5 Feb, 19:40, "Sells, Fred" <f...@adventistcare.org> wrote: > Years ago we used to get our FORTRAN card decks back from the DP center > with a piece of scrap paper saysing "She No Work". top that. I used to use a cross-compiler (targetting some obscure single-c...

Can I update a MS Access 2002 database with Visual Basic .net 2003 Standard Editon?
I am considering purchasing Visual Basic .net 2003 Standard Editon to do some development work with Web Forms and I need to know whether this edit will allow me to update an Access database (mdb) file. I already have a database which is updated through an Access front-end, I want to update the database through web forms, is this possible? what are the benefits of going for the Professional Verion of Visual Studio instead? Cheers, In VB.Net you'd use the ADO.Net objects to update the database. Visual Studio.Net is just another Rapid Application Development (RAD) tool. It has the added ...

Accessing MS ACCESS database using Data Environment
HI, I have developped a program in Visual Basic 6.0 using MS Access database. I have created all my reports through Data Environment where I have entered the location of my database file (for e.g c:\project\app\test.mdb) in the Connection properties. I have installed my application on another PC using Package & Deployment wizard. When viewing the reports on the other PC, I have to enter everytime the new location of the database. How can I solve this problem, please? nadia wrote: > HI, > I have developped a program in Visual Basic 6.0 using MS Access database. >...

Running a ms access database with access 2003 in Vista
I have a Database that I am trying to run on a new vista computer. Up to now I was running it on a win 98 computer and using access 2003! I installed access 2003 and I can make it run and view the data but I can not save any new records. Has any one seen this problem yet? Thanks Clarence Wollman On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewollman@gmail.com> wrote: Do you have the same problem with the Northwind sample application? (search your computer for northwind.mdb) -Tom. >I have a Database that I am trying to run on a new vista computer. Up >to now I was running it on a win 98 computer and using access 2003! I >installed access 2003 and I can make it run and view the data but I >can not save any new records. >Has any one seen this problem yet? > >Thanks Clarence Wollman On Aug 22, 7:29 pm, Tom van Stiphout <no.spam.tom7...@cox.net> wrote: > On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewoll...@gmail.com> > wrote: > > Do you have the same problem with the Northwind sample application? > (search your computer for northwind.mdb) I don't have a problem opening and editing the northwind.mdb. Thanks Hi I found a workaround. This database has a fronted and a backed. When I link them in the linked table manager, I was going threw the network to my computer. The reason I am doing this is when any networked computer opens the shortcut to the front end of this computer the linked table manger knows...

Accessing a MS Access database across two servers
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to link from one server to a database in another. Anyone know what I am getting at and know of a possible solution, or a link to a site which may help. thanks in advance Brendan "Singularity" <Brendan.Collins@Sin...

Best way to access a remote MS ACCESS database
What is the best way, via the internet, to access a remote Microsoft Access database? I was thinking of using VPN, but I thought that I would check here to see if there is a better way. Any suggestions? Thanks Do you mean remotely controlling an Access database, or linking tables over the internet? The first is doable, the second is a recipe for disaster. Remote Control: If your remote OS is Windows XP, you can use Remote Desktop (although only 1 person can access the PC at a time; this will change in the upcoming Service Pack for XP, but that may not help you now). Otherwise, GoToMyPC offers similar services, as does Terminal Server (a component of a Windows Server machine), PCAnywhere, et al. Linking to remote tables: You will almost certainly encounter severe problems with corruption, and your performance will almost certainly be so poor as to be unworkable. I attempted this once, with a web server in Canada and my machine in Augusta, GA. Even tiny data requests on a very well optimized data structure took waaaay too long to process ... it's simply not workable, IMO. Other alternatives would be covert the app to a web-based and place your data on a web server. Access/Jet isn't really designed for those workloads, but running a small site with minimal transactions and users can be done. Otherwsie, consider switching to a more robust data platform like MySQL, SQL Server, etc. -- Scott McDaniel CS Computer Software Visual Bas...

Can you import an Oracle 10G database into a 9I database
Good afternoon, I am curious if it is possible to import an Oracle 10g database into an oracle 9i instance. Any suggestions/thoughts? Thanks, Chris Boerman cboerman@comcast.net schreef: > Good afternoon, > > I am curious if it is possible to import an Oracle 10g database into > an oracle 9i instance. Any suggestions/thoughts? > > Thanks, > Chris Boerman > Of course. It's called downgrading. Or, if you do not want to downgrade, only if you're: 1) skillful 2) lucky You must be lucky, or I would not be answering this. Ever read the "New Features since 9i" chapters on 10G? Why do you think these are called "new"? So, export, using the 9i tool - if you're lucky, that works. Import, using the 9i tool - if you're lucky, that works. -- Regards, Frank van Bortel Top-posting is one way to shut me up... On Mon, 16 Apr 2007 20:27:32 +0200, Frank van Bortel <frank.van.bortel@gmail.com> wrote: >cboerman@comcast.net schreef: >> Good afternoon, >> >> I am curious if it is possible to import an Oracle 10g database into >> an oracle 9i instance. Any suggestions/thoughts? >> >> Thanks, >> Chris Boerman >> > >Of course. It's called downgrading. > >Or, if you do not want to downgrade, only if you're: >1) skillful >2) lucky > >You must be lucky, or I would not be answering this. >Ever read the "New Features since 9i"...

MS Access database with a file extension of .mde
Good day: Can you kindly assist me in opening a MS Access database with a file extension of .mde? I get an error message stating "This database is in an unrecognized format". Any help is greatfull. TIA This usually indicates an attempt to open an Access 2000 database in an earlier version. -- MichKa [MS] NLS Collation/Locale/Keyboard Development Globalization Infrastructure and Font Technologies This posting is provided "AS IS" with no warranties, and confers no rights. "mary" <chloemelmom@yahoo.com> wrote in message news:a0a64947.0311151242.4df0c...

Accessing a passworded MS Access 2000 database in Crystal Reports
Can anybody give me some code that I can put in to my VB6 app to open a passworded Access database in the Crystal Reports 8.5 RDC? I see so many examples - none of which seem to work for me. I am using a native connection in Crystal ( pdbdao.dll). My current code is : Dim Report As New crPrintPreview Dim crTable As CRAXDRT.DatabaseTable Private Sub Form_Load() Set crTable = Report.Database.Tables.Item(1) varpath = CurDir crTable.Location = varpath & "\OrderManager.mdb" CRViewer1.ReportSource = Report CRViewer1.ViewReport End Sub All I receive is the message "Error opening file xxxxxxx etc" and then "Open Database session failed" Appreciate any help! Peter Tyler ...

accessing MS Access database fila via ODBC problem
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env, &hdbc); SQLBrowseConnect(hdbc, (UCHAR*)DSN, strlen(DSN), (UCHAR*)buf, BUF_SIZE, (SQLSMALLINT*)&rcvlen); The function SQLBrowseConnect fails and SQLGetDiagRec returns "IM001 Driver does not support this function" Can anyone help me? Thanks! David On S...

Accessing 2 tables having same name but different databases ms-access
Hi, I have an application with MS-Access as backend and JSP/ tomcat as frontend/webserver. For getting better response time(as access is very slow compared to other RDBMS's), I have split the main DB into two DB's on different disks on my server for better performance.I have kept the table names same but changed the DB names. How do I access tables from both the DB's? This is what I have done; I made different connection to the respective DB's i.e. con and con2. When I want to access data, I am using 2 result sets for retriving data from the tables, but getting no result. Here is my code: rs2_1=stmt2_1.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' order by Req_No"); rs=stmt.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' AND Req_No> 5500 order by Req_No"); So, rs & stmt are for latest records and rs2_1 & stmt2_1 correspond the records from older DB. I think, I'm forgetting some small thing but cant get it. Please advice. What do you mean "no result"? Does "next()" return false for both rs2_1 an= d rs? If you're really trying to improve response time, you should probably be ru= nning the two queries in separate threads ... but as you acknowledge, Acces= s may not have as high performance as other RDBMSs. You would also see rel= iability adv...

Can an Access 2013 database link to an Access 97 back end?
Can an Access 2013 database link to an Access 97 back end, perhaps using ODBC even? On Monday, September 29, 2014 5:17:03 PM UTC-4, Neil wrote: > Can an Access 2013 database link to an Access 97 back end, perhaps using > > ODBC even? I think this answers the question. http://office.microsoft.com/en-us/access-help/convert-a-database-to-the-accdb-file-format-HA102749625.aspx. I don't see why the links to the backend wouldn't work unless you have mapping issues or something similar. On 9/30/2014 8:02 AM, Patrick Finucane wrote: > On Monday, September 29, 2014 5:17:03 PM UTC-4, Neil wrote: >> Can an Access 2013 database link to an Access 97 back end, perhaps using >> >> ODBC even? > > I think this answers the question. http://office.microsoft.com/en-us/access-help/convert-a-database-to-the-accdb-file-format-HA102749625.aspx. I don't see why the links to the backend wouldn't work unless you have mapping issues or something similar. > No, that article just says to convert the back end to ACCDB. I need to keep the back end in A97 (another system also uses it, and it has to be in A97 format, as that system is old). I understand A13 not supporting the A97 format for databases, as that format is old. But I don't understand it not allowing to at least link to A97 tables. Seems it should be able to do that. But, apparently, you can't. One person I've spoken with elsewhere was able...

Free JDBC driver to access MS Access database from Linux enviroment.
I'm looking for a free JDBC driver that will allow me to acces a MSAccess database that resides on a Windows server from a JSPapplication that resides on a Redhat Linx server.Any suggestions would be appreciated.Thanks,Tim tim@nocomment.com wrote:> I'm looking for a free JDBC driver that will allow me to acces a MS> Access database that resides on a Windows server from a JSP> application that resides on a Redhat Linux server.> Any suggestions would be appreciated.Sounds like RmiJdbc is a solution.See <http://rmijdbc.objectweb.org>-- Thomas...

Web resources about - How can I import CSV with Carriage Return? - comp.databases.ms-access

Carriage - Wikipedia, the free encyclopedia
A carriage is a wheeled vehicle for people, usually horse-drawn; litters (palanquins) and sedan chairs are excluded, since they are wheelless ...

Carriage - Wikipedia, the free encyclopedia
A carriage is a wheeled vehicle for people, usually horse-drawn; litters (palanquins) and sedan chairs are excluded, since they are wheelless ...

Train Chartering - private First Class carriage from London - Flickr - Photo Sharing!
Train Chartering organises private carriages on scheduled train services throughout Europe, inclduing the UK. This is a First Class carriage ...

Self proclaimed "Dickhead" Horse Drawn Carriage Operator uses carriage as a weapon on cyclist - YouTube ...
Melbourne, 2:30pm, Saturday 6th December 2014. A horse drawn carriage operator becomes very rude and aggressive after I politely ask him to not ...

Cyclist films heated clash with horse-drawn carriage driver in CBD
A cyclist has recorded his run-in with a horse-drawn carriage operator on a busy Melbourne road.

Tram system jammed as old carriages fall apart
Melbourne needs 110 more new bumper-sized trams by 2020 to avoid chronic overcrowding as the city population soars and to compensate for the ...

Sydney Metro Northwest: Transport minister unveils life-size model of Metropolis carriage - DailyTelegraph ...
THIS is the first glimpse of Sydney’s new single-deck driverless trains that are set to run on the city’s new Metro network from 2019.

Catwalk in carriages: Fashion launch on Perth train
IT’S not a typical runway where you’d expect to find the latest fashions.

Catwalk in carriages: Fashion launch on Perth train - PerthNow Search Search
IT’S not a typical runway where you’d expect to find the latest fashions.

Swiss train carriage plunges into ravine
A landslide has derailed a passenger train in Switzerland sending one carriage plunging into a ravine.

Resources last updated: 3/21/2016 4:56:29 AM