|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/23/2006 8:36:00 AM
Posts: 3,
Visits: 1
|
|
I've created a volatile table and want to import a multiple field list into it from an excel file I have saved as delimited text. I've been succesful with a single field, but not multiple fields. The insert code I've used so far is as follows: insert into cs.tag_table2 values(?) I can manually do every row, but there's got to be a better way, right? Any help is greatly appreciated...
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/3/2006 2:56:00 PM
Posts: 13,
Visits: 1
|
|
If you have the file in excel, you can create a column that uses the concatenate function to build your insert statements.
=concatenate("insert into cs.tag_table2 (field1, field2) values (",A1,",",B1,");"
Paste that down a column for each row. Then copy and paste the insert statements into queryman and run it like a script.
It's not exactly what you are asking for, but it's a quick trick to insert excel data into any database.
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/23/2006 8:36:00 AM
Posts: 3,
Visits: 1
|
|
|
Thanks for the help, that'll work! I'm still interested if anyone has a way to do it with one statement...
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 8/17/2006 4:25:00 AM
Posts: 3,
Visits: 1
|
|
Looking at this differently.
Try linking the excel spreadsheet to an access database. Link to your target table in teradata using ODBC.
Then create a insert data query in the query.
Its messy and not really a recommended way of doing it but it will work.
Simon Chandler EDW Database Administrator
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 7/22/2008 3:48:36 AM
Posts: 173,
Visits: 5
|
|
The most common and used way of loading data to Teradata from a flat-file is through the load utilities. You could write a Fastload or Multiload script and load the CSV formatted file with that.
|
|
|
|