ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help: Creating dynamic sql queries in excel (https://www.excelbanter.com/excel-programming/370128-help-creating-dynamic-sql-queries-excel.html)

[email protected]

Help: Creating dynamic sql queries in excel
 
Here is a question, and thank you in advance for taking the time to
read and help.

I have an Excel Spreadsheet that I need to auto-populate depending on
the PurchaseOrder number that a user types in.

So PONumber: <Cell here

and that cell's data needs to be the where clause of my sql statement.
When the user enters in the value, the query is executed and popluates
the sheet with the need information in the give places.

I have tried to link in the query with Data-Import External Data-New
Data source and New Data Query. The wizard seems to ask for static
queries, and formatting the data that I query is not to flexable.

Help me out here.

Thanks again.

-Rooster


JonR

Help: Creating dynamic sql queries in excel
 
Go into Data Get External Data New Database Query as before and identify
your data source. When the wizard pops up to select the tables and rows you
want, click 'Cancel' You will be asked if you want to continue editing the
query in MS Query. Click 'Yes'. You should be able to set up a parameter
query in MS Query to retrieve the values you need based on criteria in
certain cells.
--
HTH

JonR


" wrote:

Here is a question, and thank you in advance for taking the time to
read and help.

I have an Excel Spreadsheet that I need to auto-populate depending on
the PurchaseOrder number that a user types in.

So PONumber: <Cell here

and that cell's data needs to be the where clause of my sql statement.
When the user enters in the value, the query is executed and popluates
the sheet with the need information in the give places.

I have tried to link in the query with Data-Import External Data-New
Data source and New Data Query. The wizard seems to ask for static
queries, and formatting the data that I query is not to flexable.

Help me out here.

Thanks again.

-Rooster




All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com