Back to Blog
Excel update named range vba access6/1/2023 If I can link the defined name range into the query definition then presumably all I would need to do is refresh it to process the next set of updates. The results are that the values get updated in the database as specified and the value in the query results is the last time I ran it. Where Part = '0-0.250A' Update v_Inventory_mst3 set STANDARD_COST_QTY = '0' = Odbc.Query("dsn=global_fah", "Update v_Inventory_mst3 set STANDARD_COST_QTY = '0' I can do this successfully but manually and the query definition looks like this: Update v_Inventory_mst3 set STANDARD_COST_QTY = '0' where Part = '000M-SS' Update v_Inventory_mst3 set STANDARD_COST_QTY = '0' where Part = '0-0.250A' Most are select queries but some are update queries to an ERP database running on Pervasive. I write dynamic SQL scripts (based on user input) in a worksheet, then in a single cell (range name = “sqlQuery”) I use the Textjoin function to compile the code into that cell. I need to update a Power Query using VBA or be able to define the query so that the code is linked to a named range in the same workbook.
0 Comments
Read More
Leave a Reply. |