Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel "Get external data" configuration

Status
Not open for further replies.

Nakis

MIS
Jun 5, 2002
37
CY
Hi,
I'm running Excel's "Data"-> "Get external data" to connect via ODBC to OracleDB. The Query returns a number to one cell, lets say A1.
I need to run a different query to cell A2, but it doesn't let me; instead it thinks that cell is assigned to the first query and it only gives me the option to Edit the query or refresh it. I have to go to cell A4 to be able to create a new query.

Evem if I do that, sometimes when I refresh my queies, the second query moves from cell A4 to cell A3.

How can I solve the problem and be able to run different queries to consecutive cells?

thanx
 
If I understand correctly, when you bring back data from an external source, it populates the cells that it needs to, even if they are blank (empty).

So if you are bringing back lets say data in A1, but it is 2 columns wide, A2 will also be used, even if there is nothing in A2.

The issue of queries moving from cell to cell is a new one. I set up around 30 queries on a single sheet and did an autorefresh and never had that problem.

What are you pulling back and ow are you setting up the queries?
 
In Data Range Properties I had "Insert cells for new data, delete unused cells"; when I changed it to "Overwrite existing cells with new data, clear unused cells" the shifting of the cells problem was solved.

I can't understand though why the query reserves an area more than one cell.
Here's my query, which I believe should only occupy one cell:

SELECT Sum(VCONTRACTDB.prinvalamt/VCONTRACTDB.arbrate)
FROM VOX1.VCONTRACTDB VCONTRACTDB
WHERE (VCONTRACTDB.INSTRID='SPOT') AND (VCONTRACTDB.CUSTOMER <> 'INTERNAL') AND (VCONTRACTDB.CONTRACTSTATUS<>'D') AND (VCONTRACTDB.INPUTDATE Like '2002%') AND (VCONTRACTDB.PRINVALCUR='EUR') AND (VCONTRACTDB.PRINVALCCUR='CYP') OR (VCONTRACTDB.INSTRID='FXCALL') AND (VCONTRACTDB.CUSTOMER Not Like 'INTERNAL') AND (VCONTRACTDB.CONTRACTSTATUS<>'D') AND (VCONTRACTDB.INPUTDATE Like '2002%') AND (VCONTRACTDB.PRINVALCUR='EUR') AND (VCONTRACTDB.PRINVALCCUR='CYP') OR (VCONTRACTDB.INSTRID='FWD') AND (VCONTRACTDB.CUSTOMER <> 'INTERNAL') AND (VCONTRACTDB.CONTRACTSTATUS<>'D') AND (VCONTRACTDB.INPUTDATE Like '2002%') AND (VCONTRACTDB.PRINVALCUR='EUR') AND (VCONTRACTDB.PRINVALCCUR='CYP')
ORDER BY VCONTRACTDB.PRINVALCUR, VCONTRACTDB.PRINVALCCUR, VCONTRACTDB.PRINVALAMT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top