If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > INSERTing test data without knowing row identifier

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-08, 08:41
compsci compsci is offline
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 117
INSERTing test data without knowing row identifier

Hello all,

I have a list of emails in a text file and I have a table with an empty row that I wish to fill this list with, the table may have more fields than i have emails but thats fine. So how can I add this list of emails to the empty fields.

I can do it manually but I was hoping that there was an sql statment that i can write that will go through each row and add an email.

Is there a way in SQL to say "for each row" do this (Insert)?

Thanks all
Reply With Quote
  #2 (permalink)  
Old 12-10-08, 09:26
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
load the text file of emails into a table in mysql

then do a SHOW CREATE TABLE for both tables, please
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-10-08, 09:59
compsci compsci is offline
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 117
Aww, I can't find my file list of emails! Will search again, if I can't find it don't worry, I will have to create a list of emails again and I might as well enter it into the DB! I have another question though, will create a new thread for it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On