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
How to embed a SQL query in a formula (Read 2822 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
How to embed a SQL query in a formula
20.11.06 at 20:59:43
 
Peter from Canada asked:
 
I downloaded thr trial for SQL*XL. I want to embed a sql query in the formula line of excel but cannot make it work. I  get 'the formula you typed contains an error'. Do you have any examples?
 
Answer:
The formula to use to execute a query and return a value is SQLQueryValue.
 
Examples:

  • =SQLQueryValue("select * from mytable")
  • =SQLQueryValue("select * from mytable where mycol = " & A1)
  • =SQLQueryValue("select * from mytable", 10)
    Note that this will return the data from row 10.
Back to top
 
 

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