Ø
Not a very useful suggestion. The query has a sum and grouping.
It was just a suggestion for debugging, so we could try to isolate the cause of the problem. Some had wondered if DBMS_OUTPUT was causing the problem, so I
mentioned the SB because no DBMS_OUTPUT calls are done from the SB. I was not suggesting that you use that as a workaround to the problem.
Anyway, as you discovered, the variables were the cause of the problem, not dbms_output. It will be fixed next beta.
-John
From: wimdelange_062 [mailto:bounce-wimdelange_062@toadworld.com]
Sent: Wednesday, July 31, 2013 2:11 AM
To: toadoraclebeta@toadworld.com
Subject: Re: [Toad for Oracle - Beta Discussion Forum] Saving data in 12.1.0.3 is a problem
Re: Saving data in
12.1.0.3 is a problem
Reply by wimdelange_062
Not a very useful suggestion. The query has a sum and grouping. There are some options where you can manipulate the query, but then I got more data then I expect. Or I must
create a view for it in the production environment? Not a very good idea.
The problem is not that I cannot export the data. It is not much data and I could switch on the “Display records in grid”. Then it works.
The problem is that when running the query (using F9) on a table which is not mutating and using no display of recors in grid, Toad under not known conditions decides to not
export the data, because of the fact that there is no data? And there is data to export. And it is a problem in version 12 that is not in version 11. I have two queries on different tables that has the same problem, but where the result set is more or less
the same.
Where the DBMS output is coming from is unclear to me.
The suggestion to create the view is a good one. View with variables, does that work? Hmmm…
The query was:
SELECT company
, accounting_year
, accounting_period
, account
, SUM (amount_balance) total_amount
FROM accounting_balance_tab
WHERE accounting_year = :year
AND accounting_period = :period
GROUP BY company, accounting_year, accounting_period, account
I change it to:
SELECT company
, accounting_year
, accounting_period
, account
, SUM (amount_balance) total_amount
FROM accounting_balance_tab
WHERE accounting_year = 2013
AND accounting_period = 2
GROUP BY company, accounting_year, accounting_period, account
And test this one first to see if the problem is still there. And to my surprise I can export the data?
So it is the variables that cause the problem. Back to the one with the variables and execute the steps with spool on. Why does it say :year(Unknown)= when I save the
data? The query is executed again, but the variables has not the correct value!!!
If I test this in Toad 11.6.0.43, spool added too.
SPOOL in Toad 12.1 (SPOOL ON, execute query, save data)
Session: IFSAPP@IFS_PROD
Timestamp: 08:49:12.473
SELECT company
, accounting_year
, accounting_period
, account
, SUM (amount_balance) total_amount
FROM accounting_balance_tab
WHERE accounting_year = :year
AND accounting_period = :period
GROUP BY company, accounting_year, accounting_period, account
:year(VARCHAR[4],IN)=‘2013’
:period(VARCHAR[2],IN)=‘02’
Session: IFSAPP@IFS_PROD
Timestamp: 08:49:13.102
begin dbms_output.get_line(line => :line, status => :status); end;
:line(LONG,OUT)=
:status(INTEGER,OUT)=
Session: IFSAPP@IFS_PROD
Timestamp: 08:49:38.115
SELECT company
, accounting_year
, accounting_period
, account
, SUM (amount_balance) total_amount
FROM accounting_balance_tab
WHERE accounting_year = :year
AND accounting_period = :period
GROUP BY company, accounting_year, accounting_period, account
:year(Unknown)=
:period(Unknown)=
SPOOL 11.6.0.43 (SPOOL ON, execute query, save data)