External Data Query

Hobbes

New Member
Joined
Sep 13, 2006
Messages
1
I am running Excel 2002 SP3 and have created an external data query to our SQL database. I am trying to pull out a cost field based on a sku entered in an adjacent cell. The SQL looks like this:

SELECT invntry.invn_std_cost
FROM bes_prod.dbo.invntry invntry
WHERE (invntry.invn_sku_cd=?) AND (invntry.invn_loc_cd='WPG1')

So I use the parameters option to tell it to get the value from a certain cell, lets say A1. It puts in =Sheet1!$A$1, so I remove the $ to eliminate the static refrence, and everything works fine, it puts the information into B1. But if I try to fill down the query to additional cells, it does not update the parameter refrence, it keeps defaulting to A1, is there anyway to make this value change as the query is moved around? I have hundreds of skus on this sheet, and it creates a new query for each one, it becomes unmanageable.

Thank you for any help
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,140,938
Messages
5,703,278
Members
421,289
Latest member
fbohlandt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top