Mysql insertion

I have the following database table created this way:

CREATE TABLE AUCTIONS (
  ARTICLE_NO      VARCHAR(20),
  ARTICLE_NAME    VARCHAR(100),
  SUBTITLE        VARCHAR(20),
  CURRENT_BID     DECIMAL(5,2),
  START_PRICE     DECIMAL(5,2),
  BID_COUNT       VARCHAR(20),
  QUANT_TOTAL     VARCHAR(20),
  QUANT_SOLD      VARCHAR(20),
  ACCESSSTARTS    VARCHAR(20),
  ACCESSENDS      VARCHAR(20),
  ACCESSORIGIN_END VARCHAR(20),
  SELLER_ID       VARCHAR(20),
  BEST_BIDDER_ID  VARCHAR(20),
  FINISHED        TINYINT,
  WATCH           TINYINT,
  BUYITNOW_PRICE  DECIMAL(5,2),
  PIC_URL         VARCHAR(20),
  PRIVATE_AUCTION TINYINT,
  AUCTION_TYPE    VARCHAR(20),
  ACCESSINSERT_DATE     VARCHAR(20),
  ACCESSUPDATE_DATE     VARCHAR(20),
  CAT_1_ID        VARCHAR(20),
  CAT_2_ID        VARCHAR(20),
  ARTICLE_DESC    TEXT,
  COUNTRYCODE     VARCHAR(20),
  LOCATION        VARCHAR(20),
  CONDITIONS      VARCHAR(20),
  REVISED         TINYINT,
  PAYPAL_ACCEPT   TINYINT,
  PRE_TERMINATED  TINYINT,
  SHIPPING_TO     VARCHAR(20),
  FEE_INSERTION   DECIMAL(5,2),
  FEE_FINAL       DECIMAL(5,2),
  FEE_LISTING     DECIMAL(5,2),
  PIC_XXL         TINYINT,
  PIC_DIASHOW     TINYINT,
  PIC_COUNT       VARCHAR(20),
  ITEM_SITE_ID    VARCHAR(20),
  STARTS          DATETIME,
  ENDS            DATETIME,
  ORIGIN_END      DATETIME,
  PRIMARY KEY ( `ARTICLE_NO` ));

      

This is normal.

However, when trying to enter this line:

5555555 This is the best ARticle in the world!!!!!! True    55.55   3232.2  6   5   5   8.7.2008 17:18:37   8.7.2008 17:18:37   8.7.2008 17:18:37   5454    7877    1   1   46.44 http//www.x.com   1   good    8.7.2008 17:18:37   8.7.2008 17:18:37   22  44  ANZTHINGcanogoherehihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh    77  germanz none    1   1   1   446 everzwhere australia    22.2    22.2    22.2    1   1   5   1

      

There seems to be a problem with buy_it_nowprice in a tab delimited text file

buy_it_nowprice correctly shows 46.44 when choosing buy_it_nowprice from Auctions, but select pic_url from Auctions shows it returns 1 instead of website and as a result all subsequent entries are irrelevant.

I'm sure I missed a field or something, but I can't figure out what it is.

0


source to share


3 answers


You have a space after 46.44, not a tab,



+1


source


There is a space after the number. If you have the option to use a different field separator from an application that generates a text file for you, that will probably make it easier to spot these problems.



0


source


Make sure the buyitnow_price and pic_url data fields are actually tab-separated, looks like it might be a space and not a tab

0


source







All Articles