Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7045657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:33:26+00:00 2026-05-28T02:33:26+00:00

I am using H2 DB in my java application. I want to load a

  • 0

I am using H2 DB in my java application. I want to load a .csv file to the DB. This file contains column headers as the first line of the file. So while loading the file into the DB through CSVREAD command, H2 is trying to parse the first line also and thus failing.

So how to skip loading the first line. Below the query I am using to load the file to the DB:

"CREATE TABLE TEST (CIRCLE VARCHAR_IGNORECASE(50), MSISDN VARCHAR_IGNORECASE(50), PORT_IN_DATE TIMESTAMP, OPERATOR VARCHAR_IGNORECASE(255), PRODUCT_TYPE VARCHAR_IGNORECASE(255), PORT_ID VARCHAR_IGNORECASE(255)) AS SELECT * FROM CSVREAD('src/test/resources/test.csv', "
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:33:26+00:00Added an answer on May 28, 2026 at 2:33 am

    The CSVREAD function supports both files with and without column header. If the file contains a column header, then don’t supply the column list in the function, for example:

    SELECT * FROM CSVREAD('test.csv');
    SELECT * FROM CSVREAD('data/test.tsv', null, 'rowSeparator=' || CHAR(9));
    

    and if the file doesn’t contains the column header, then supply the column list in the function call, for example:

    SELECT * FROM CSVREAD('test2.csv', 'ID|NAME', 'charset=UTF-8 fieldSeparator=|');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using H2 DB in my Java application. I want to load a
I am scraping data from web site using my java application and want to
How to get money from users phone using Java application? So I want to
I have a java-application using JDBC for database interaction. I want to do a
I want to create a Java application bundle for Mac without using Mac. According
Im developing desktop java application using maven. I got a *.properties file that I
I have spring application and using property file want to read the values from
I'm creating a sticky note application using Java. What I want to do: I
I want to create a rate system for an android application using java. Ive
I am using an XML configuration file that is loaded into my Java application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.