NoviceMe
10-20-2004, 02:16 AM
Hi,
I am trying to insert multiple rows into my database, but I am not sure how to do it, I have been inserting each line, by writing an insert statement for each - is there a quicker way? I also have the records in a text file, so Is there a way of writing this statement so that it imports all rows from the file, regardless of how many rows there are? I am using SQL Anywhere v5. and am fairly new to SQL. My current code is:
INSERT INTO work_type (team_code, date_of_event, start_time, event_name) VALUES ('AT1-01', '2004/01/12', '20:35');
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/04/01', '01:45',);
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/01/11', '17:04');
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/01/23', '00:00');
Thanks in advance
I am trying to insert multiple rows into my database, but I am not sure how to do it, I have been inserting each line, by writing an insert statement for each - is there a quicker way? I also have the records in a text file, so Is there a way of writing this statement so that it imports all rows from the file, regardless of how many rows there are? I am using SQL Anywhere v5. and am fairly new to SQL. My current code is:
INSERT INTO work_type (team_code, date_of_event, start_time, event_name) VALUES ('AT1-01', '2004/01/12', '20:35');
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/04/01', '01:45',);
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/01/11', '17:04');
INSERT INTO work_type (team_code, date_of_event, start_time, event_name, ) VALUES ('AT1-01', '2004/01/23', '00:00');
Thanks in advance