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

  • SEARCH
  • Home
  • 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 8972097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:07:54+00:00 2026-06-15T18:07:54+00:00

Can someone tell me what i’m doing wrong here it’s got to be something

  • 0

Can someone tell me what i’m doing wrong here it’s got to be something simple first I created some tables with foreign keys and then tried to import the data from textfiles and had all sorts of errors without ever getting the data in so now I tried to just create the tables load the data in then add the foreign keys hoping that would work but it isnt either heres what i’ve done

create table Books (
ISBN Char(10) not null,
Title Varchar(50) not null,
Price Decimal(5,2) null,
Authors Varchar(50) null,
Pages int null,
PubYear int null,
QTY int null,
Constraint Books_PK primary key(ISBN)
);



create table customers (
customerid int not null,
company varchar(30) null,
firstname varchar(30) null,
lastname varchar(30) null,
street varchar(50) null,
city varchar(30) null,
state char(2) null default 'NE',
zip char(5) null,
phone char(10) null,
constraint customer_pk primary key(customerid)
);

create table orders (
orderid int not null,
customerid int not null,
orderdate date null,
shipdate date null,
shipping decimal(5,2) null,
salestax decimal(5,2) null,
constraint order_pk primary key(orderid)
);

create table orderinfo (
orderid int not null,
isbn char(10) not null,
qty int not null,
price decimal(5,2) not null,
detailid int not null auto_increment,
constraint orderinfo_pk primary key(detailid)
);

load data infile 'C:/lab8/books.txt
into table books;

it gives me an error saying DATA TOO LONG FOR COLUMN ISBN IN ROW 1

the content of the textfile is

0929306279,  Bell labs,  29.95,  Gehani,  269,  2008,  121
0929306260,  Java,  49.95,  Sahni & Kumar,  465,  2008,  35
0670031844,  White Mughals,  34.95,  Dalrymple,  459,  2008,  78
0439357624,  Born Confused,  16.95,  Hidier,  432,  2007,  11

clearly the ISBN is 10 characters so why won’t it go into the table?

  • 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-06-15T18:07:56+00:00Added an answer on June 15, 2026 at 6:07 pm

    If you have , as a separator, you must say so.

    load data infile 'C:/lab8/books.txt'
    into table books
    fields terminated by ',';
    

    According to LOAD DATA INFILE Syntax, the default is a tab character \t.

    If you specify no FIELDS or LINES clause, the defaults are the same as if you had written this:

    FIELDS TERMINATED BY ‘\t’ ENCLOSED BY ” ESCAPED BY ‘\\’
    LINES TERMINATED BY ‘\n’ STARTING BY ”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone tell me what i am doing wrong here? I want the boxes
Can someone tell me what I am doing wrong here: function onAjaxDone(data) { var
Can someone tell me what I'm doing wrong here and how to make the
Can someone tell me what I'm doing wrong to package this as a module:
can someone tell me what in the world I'm doing wrong? trying to take:
Can someone tell me the different between LinkButton.PostBackUrl and HyperLink.NavigateUrl? I've got a asp.net
Can someone tell what is wrong with this query? sqltext = SELECT utyp, count(*)
Can someone tell me what is wrong with the following code? Set<String> cmds =
Can someone tell me why I can't select the table tab? Here is a
Can someone tell me what's wrong with this http://jsfiddle.net/Yp8Bz/ ? It works fine in

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.