Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Re: Selecting data from other sheets (Read 8036 times)
tapper
YaBB Newbies
*




Posts: 5
Re: Selecting data from other sheets
10.01.06 at 23:10:40
 
Maybe I am doing something wrong, but when I use:
------>select * from emp where ID = :Sheet2!A12
in a query, the "SQL Parameters" dialog comes up asking me to setup a bind variable.
When I use the first statement you gave me:
------>select * from emp where ID = :A12
It works, it doesn't ask me to setup a bind variable, it just puts the value from cell A12 into the select statment.
But I need to reference values that are on a different sheet, which seems to always prompt for a bind variable setup.
 
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Selecting data from other sheets
Reply #1 - 10.01.06 at 23:17:50
 
It would in both cases setup the bind variable. SQL*XL is programmed to only show the parameters dialog when there is no value in the cell. If you always want SQL*XL to show the parameters dialog, check the parameters dialog checkbox on the resultset dialog.
 
I guess you run both commands from Sheet1. Therefore :A12 refers to Sheet1!A12 and that is a different cell from Sheet2!A12. My guess is therefore that your cell A12 in Sheet1 contains a value  which made it work ok and that your cell A12 in Sheet2 does not contain a value which did not make SQL*XL to return anything from the query.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
tapper
YaBB Newbies
*




Posts: 5
Re: Still not working
Reply #2 - 11.01.06 at 16:01:04
 
As stated earlier, I may be having a brain cramp, but here is what I am doing:
 
If I open a new worksheet (Sheet1) and type a user ID in cell A1, then I do a query " select * from EMP where ID=:A1 "
This works just fine!
 
NOW I leave that cell filled in with the same user ID and I open a NEW worksheet (Sheet2) I click into the Sheet2 tab because I want my query results to show up on Sheet2. I do another query  " select * from EMP where ID=:Sheet1!A1 "
And this time the SQL Parameters dialog box comes up asking me to setup the bind variable. ("Sheet1_A1")
 
It seems to me that the ":Sheet1!A1" reference is causing a problem, or as I said I am misunderstanding your original instructions.
 
Thanks
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Selecting data from other sheets
Reply #3 - 11.01.06 at 16:35:20
 
Thank you for your persistence.  
A while ago there was a small problem with the parameters that pointed to cells in other sheets. That was fixed. Perhaps we have the same thing again or you are using that slightly older version that has the problem. Can you try to download the latest release and see whether that helps? I will check it out as soon as I have a chance.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
tapper
YaBB Newbies
*




Posts: 5
Re: Selecting data from other sheets
Reply #4 - 11.01.06 at 16:49:48
 
I will download the most recent update. What is the process?  Do I have to do all of those key activiation steps, or just run the most recent download and my activation key will still be setup?
Back to top
 
 
  IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Re: Selecting data from other sheets
Reply #5 - 11.01.06 at 18:40:09
 
You don't need to go through activation again. Just install the new version over the top of the old. Quit Excel before you run the setup program.
 
One note I wanted to make is this.
You rightfully commented that the parameter name SQL*XL creates for sheet2!A1 is sheet2_A2. This is because exclamation marks are not allowed in the parameter name.
Back to top
 
 

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1