This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

CSV File returns empty values  RSS feed

 
Rancher
Posts: 624
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely this isn't the right forum to ask this question, but since there isn't an better one to suite my needs, I'll give it a try.
The person fo whom I writting this program used to keep all his dat in an excelsheet.
I normalized the file and created seperate tables.
Now I would like to load the exsisting data in to the db, but already when filling the first table something goes wrong.
I seperated the needed fields in an seperate xls file and created an csv file from it.
But when executing the statement and checking my db if it loaded correct I noticed that everyting is filled with null values.
Anyone an idea how come?

The query I used:


The csv-file:


I included a printscreen of the result too
dbResult.png
[Thumbnail for dbResult.png]
DB Result
 
Bartender
Posts: 19996
95
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Long posts get less responders. An ideal post is something that where the entire message fits on a single screen. It would have been enough to list a few sample lines; the entire dataset is too much.

If I haven't got my databases crossed, that's a MySQL batch load you're trying to do there.

Now why you're ending up with nulls, rather than either good data or no data is a mystery to me. All I can think to do is recommend a look at the database server logs.
 
Rancher
Posts: 3767
40
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm pretty sure that should be only one " mark and not two.
Which would be why you are getting nothing out.

ETA: Also, I don't think you need the first row as the loader uses the column order from the table definition.
 
Daniel Demesmaecker
Rancher
Posts: 624
11
Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Tim: It was indeed a mysql database

[quote = Dave Tolls]  ETA: Also, I don't think you need the first row as the loader uses the column order from the table definition.

That dosn't make a difference, I ignore the first line, cause Included my column headers in my csv file, but beside that, you were right about the '""', so thanks a bunch.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!