[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Import CSV Files

Hi,

I would like to create one more enhancement in my SWING application to import the CSV files and insert them into DB. Well, that sounds easy. However, the CSV files may vary in the columns order and etc so I need to provide the users a way to dynamically mapping to the column in DB.

Right now, I am thinking to create a dynamic query to do this (I think that it should do it). However, does anyone of you have any other idea or better idea?

Thanks
David
0
suprapto45
Asked:
suprapto45
1 Solution
 
n_sachin1Commented:
Hi David,
  You can probably look towards creating a table/column name to CVS column header name mapping. Use this information to map the CVS file data to your prepared statements/result sets for insert/update/retrieve functions.
You can do this as a pre-processing action before you pass the information to the queries.
regards
Sachin
0
 
suprapto45Author Commented:
Thanks.

Sorry for the delay. I will have a look at your comment later on.

David
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now