How to convert CSV into Database Table?
2012-06-28 23:49
435 查看
CSV file:
the first line will be the column names, the rest of the data will be the content.
1. recognize data type
2. get table columns
3. create "create table" sql
4. execute it
5.create "Insert" sql, use prepareStatement. Therefore, setXXX should be adjusted by data type.
6. execute them all
COL1;COL2;COL3 1;2.1;a 2;2.2;b 3;2.3;c
the first line will be the column names, the rest of the data will be the content.
1. recognize data type
2. get table columns
3. create "create table" sql
4. execute it
5.create "Insert" sql, use prepareStatement. Therefore, setXXX should be adjusted by data type.
6. execute them all
相关文章推荐
- How to convert Word table into Excel using OpenXML
- SQLite Tutorial 5 : How to Import CSV or Excel file into SQLite database
- 怎样给Oracle 数据库的表加触发器: how to add trigger for Oracle Database table
- How to convert a list of tensors into a tensor
- How to convert smartform output into pdf?
- How to convert an OpenCV cv::Mat into a float* that can be fed into Vlfeat vl_dsift_process ?
- 【Z一贴】C++ String: How to convert a string into a numeric type?
- SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
- How to convert simple data to a geodatabase
- How to Convert 10g Single-Instance database to 10g RAC using Manual Conversion procedure
- How To Use RMAN CONVERT DATABASE on Source Host for Cross Platform Migration
- How to Read XMLDocument into a SQL Sever XML field / saving XML to database or filesystem...best method?
- SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
- How to Move or Copy a Tablespace to Another Database【每日一译】--2012-11-03
- How to Create/Drop Database, Table
- SQLite Tutorial 4 : How to export SQLite file into CSV or Excel file
- How To Convert Number into Words using Oracle SQL Query
- How to load data into SAP HANA database
- Insight into DOMDocument - how to convert data from XML to array in PHP
- [Linux cmd line] How to convert a binary file into output in C include file style.