Question

Question on database How do I insert multiple values into a table from a text file?

Question on database

How do I insert multiple values into a table from a text file?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Read the text files to a stream using the stream reader.

Using the insert command,table name and values.

For examaple:

INSERT INTO table name (column name1, column name2)  VALUES (value1,value2);  

Add a comment
Know the answer?
Add Answer to:
Question on database How do I insert multiple values into a table from a text file?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MongoDB and Mongoose Question I have a database-initializer.js file that initializes a MongoDB database. In it...

    MongoDB and Mongoose Question I have a database-initializer.js file that initializes a MongoDB database. In it is this line let db = client.db('myDatabase'); I want to have another file which is my server.js file (that uses Node.js and express to create a server and handle requests) and in that file I want to use mongoose and connect to the database initialized by the database-initializer.js file, would I do this by the following line: var dbURL = 'mongodb://localhost:27017/myDatabase'; mongoose.connect(dbURL); Would that...

  • Please solve. How do I create my own text file? Where do I save it so...

    Please solve. How do I create my own text file? Where do I save it so that it is recognized by python? Do I have to import it into my code? the prompt: Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. An example file along with the correct output is shown below: example.txt the quick brown fox jumps over the lazy dog Enter the input file name:...

  • how do you load text from a txt file in java

    how do you load text from a txt file in java

  • Python Question. I am trying to connect to a database and create a table using Python...

    Python Question. I am trying to connect to a database and create a table using Python in this code but I keep getting an error on line 48 saying that "Quotes" is not defined. Could anyone please help me set this up correctly? I am using Azure SQL Database to create this. import pyodbc import json import requests as r import pprint connection_string = 'Driver={ODBC Driver 17 for SQL Server};' \ 'Server=randomquotegenerator.database.windows.net,1433;' \ 'Database=RandomQuoteGenerator;' \ 'Uid=carterholliday;' \ 'Pwd=MIS54002k19;' \ 'TrustServerCertificate=no;'...

  • Here is my code to insert data into a database. code: private void button2_Click(object sender, EventArgs...

    Here is my code to insert data into a database. code: private void button2_Click(object sender, EventArgs e) { //Insert Button string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source = C:\project\patientDB.accdb"; OleDbConnection connection = new OleDbConnection(connString); OleDbCommand cmd = connection.CreateCommand(); cmd.CommandText = "insert into Medical ([PatientID],[GeneralMedicalHistoryID],[Education] values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "' )"; connection.Open(); cmd.ExecuteNonQuery(); MessageBox.Show("Record Inserted"); connection.Close(); } However it says syntax error in INSERT statement when I try to add. What am...

  • How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow...

    How can I print the Database table in PHP please ? here I have form for name and email, also I have php code that allow user to add his name and email to my database, all I need to print my final database when the user click on submit. <form action="" method="post"> <label>Name :</label> <input type="text" name="name" required="required" placeholder="Please Enter Name"/><br /><br /> <label>Email :</label> <input type="email" name="email" required="required" /><br/><br /> <input type="submit" value=" Submit " name="submit"/><br /> </form>...

  • *Suppose I have a C++ Text File That Looks Like This:* Text File: 10 20 30...

    *Suppose I have a C++ Text File That Looks Like This:* Text File: 10 20 30 40 11 40 50 60 12 50 60 70 I want to be able to read the 3rd column which have the numbers "30 , 50, 60" and find their average. How do I read data from a text file in columns instead of rows?

  • How do I combine these two SELECT query into one INSERT?Selecting a value from different tables...

    How do I combine these two SELECT query into one INSERT?Selecting a value from different tables in ORACLE? I inserted a row into vehicle_unit by using INSERT this way: INSERT INTO vehicle_unit(vunit_id,vunit_purchase_price,vunit_exhibition_flag,vehicle_insurance_id,vunit_rego, garage_code) SELECT '3',50000.00, 'R', 'sports-ute-449-12b ', 'RD3000', garage_code FROM garage WHERE garage_email ='melbournec@rdbms.example.com '; BUT now I do not want to manually enter sports-ute-449-12b. I want to select it from vehicle_detail table using the vehicle_title like this: SELECT vehicle_insurance_id FROM vehicle_detail WHERE vehicle_title= 'Toyota Hilux SR Manual 4x2...

  • Answer the following and explain so I can double check my answers If you use the Management Studio to create a database, the Studio will automatically create a database file plus a ________________...

    Answer the following and explain so I can double check my answers If you use the Management Studio to create a database, the Studio will automatically create a database file plus a ______________________ file. 10 points    QUESTION 2 When you use the Management Studio to create a check constraint, you can specify whether you want the constraint enforced for insert or __________________ operations. 10 points    QUESTION 3 When you use the Management Studio to create a database, including its tables...

  • I have a question regarding java programming. If I have this in a text file, "...

    I have a question regarding java programming. If I have this in a text file, " hey you <hello world> " How can I get it so that it only extracts the words in between the "< > " ? I am doing this with a stream and I know you can get it with the .map() function but I cannot figure out how to do it.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT