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
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