Hi,
you have to use a sql*plus variable.
Example:
<SQL>
-- Declare the variable INVOICE_COUNT as number
variable invoice_count number
-- fill the variable in a anonym-plsql-block
begin
SELECT COUNT(Invoice#)
into :invoice_count
from INVOICE NUMBER;
end;
/
-- now you can output the Value
print invoice_count
-- or us it in a subsequence select
select * from test_table where column1=:invoice_count;
</SQL>