Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel sheet with 3 columns: PartNo, Cost and Price.
The PartNo column contains values that a user has entered. The other 2 columns (Cost and Price) contain no values currently. I would like to populate the Cost and Price columns with values from a SQL database using the value in the PartNo column. I am guessing that I will loop through the PartNo column and query the database for each PartNo to obtain the Cost and Price. How can I retrieve values from the database and place those returned values in their respective columns? Is there a way to perform the query and have the results of the query stored in a variable? I would rather place just the value in the respective column and not have any "link". I have tried SQL.REQUEST which worked, but I am not crazy about the fact that it refreshes automatically. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Server for Query | Excel Discussion (Misc queries) | |||
Excel with SQL Query (*.sql) and SQL Server | Excel Discussion (Misc queries) | |||
Query SQL Server from Excel | Excel Discussion (Misc queries) | |||
Query SQL Server from Excel | Excel Worksheet Functions | |||
How do I run a SQL query against a MS SQL Server database from exc | Excel Discussion (Misc queries) |