PDA

View Full Version : loop through range upload to database



chrysw
09-27-2010, 12:53 PM
How can I loop through a range in Excel and upload the data to the database?

grichey
09-27-2010, 01:25 PM
what database? If you're using access you can just link the data via access.

chrysw
09-27-2010, 02:01 PM
Sorry for the lack of details. It's Teradata. I have the connection that I need, I just have a horrible time with loops.

Thanks so much!!

grichey
09-27-2010, 02:02 PM
Have you tried using onboard utilities such as this top google match http://forums.teradata.com/forum/analytics/excel-to-teradata ?

Kenneth Hobs
09-27-2010, 02:48 PM
Some ADO methods could be adapted most likely. The main part is to get the connection string. http://connectionstrings.com/teradata

Jam
09-27-2010, 02:51 PM
You didn't precise if you're inserting or updating data. But, I just advise you to move the whole range to an array and loop thru it rather than looping the range. It is much much faster.
On the database side, you may have to look to index.
HTH