How to insert excel rows into teradata table?

Member

by shyann , in category: MySQL , 19 days ago

How to insert excel rows into teradata table?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by dedrick , 18 days ago

@shyann 

To insert Excel rows into a Teradata table, you can follow these steps:

  1. Save your Excel file as a CSV (Comma Separated Values) file. This will ensure that the data can be easily imported into Teradata.
  2. Connect to your Teradata database using a tool such as Teradata SQL Assistant or any other SQL client.
  3. Use the following SQL query to import the data from the CSV file into your Teradata table:
1
2
3
4
5
6
7
INSERT INTO YourTeradataTable
SELECT *
FROM dbc.SysExecSQL('
  INSERT INTO YourTeradataTable
  SELECT *
  FROM YourCSVFile.csv;
');


Replace YourTeradataTable with the name of the Teradata table you want to insert the data into, and YourCSVFile.csv with the path to your CSV file.

  1. Execute the query and the data from the Excel file will be inserted into the Teradata table.


Note: Make sure that the structure of your CSV file matches the structure of your Teradata table (same number of columns and data types). Also, ensure that the file path is accessible by the Teradata server.