We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,477 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Load several lines of text into table column load data local infile

Dear All,

I have a database with two columns, to keep several files of text with lots of text lines in each text:
-----------------------
|---name -|- Text---|
-----------------------


I want the column |-name-| to be a primary key, and to upload the text file I'm using the command:

LOAD DATA LOCAL INFILE 'TEXT.htm' INTO TABLE TB(Text) SET name = 'file1';

If set the column 'name' as primary key it won't let me upload more than one line of text by column name.

Can you give me a help on this? A way so that I can upload a text file directly into the text column?

Kind Regards,

1
Contributor
1
Reply
1 Day
Discussion Span
1 Year Ago
Last Updated
2
Views
Question
Answered
softDeveloper
Junior Poster in Training
76 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I solved it using BLOB fields!!

softDeveloper
Junior Poster in Training
76 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 1 Year Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0565 seconds using 2.67MB