Database query cell formula
In this demo SQL*XL's SQLQueryValue formula will be demonestrated. It binds a query result to a cell.
I will query the currencies table (columns code and description) to lookup the description for a currency code. The needed SQL is: select description from currencies .
To retrieve the description for the correct currency code the following where
clause is added. Note the use of the concatenation operator & and that
we need to wrap the code in single quotes:
"select description from currencies where code = '" & A1 & "'"
After creating one formula, simply copy it down so it works on the other source cells too.