Gerrit-Jan Linker
|
Many count star queries A SQL*XL user sent me a spreadsheet to inspect. I noticed he used a lot of count(*) queries. All these queries were stored in comments and he uses the refresh button to requery them all. This is a perfect way to build a spreadsheet however a more elegant technique is available to create these dasbhboard or cockpit type of spreadsheets. Use the SQLQueryValues function to "bind" a cell to the query result. Just type e.g. =SQLQueryValues("select count(*) from emp") to show the number of rows in emp in the cell. If your queries get too large so you get above Excel's 255 character formula limit, just type the SQL in a cell somewhere far away on your spreadsheet (so you cannot see it) and reference the cell address: =SQLQueryValue(Sheet22!D12)
|