Quantcast
Channel: Toad for Oracle Forum - Recent Threads
Viewing all 4385 articles
Browse latest View live

WITH statement error on execute package body

$
0
0

I am using Toad for Oracle Base tool , registered copy version 10.1.1.8.

I have a situation where several records should be generated and inserted in another table, but the number of generated records is depending on a property witch has different values for different records.

For that I have developed a statement like :

INSERT INTO TableFinal
(
fa,
fb,
fc)
WITH dataTab
(f1, f2, r) AS   -- here points the error
(SELECT f1, f2, 1 as r
FROM Table1
WHERE condition1
UNION ALL
SELECT f1, f2, r + 1
FROM dataTab
WHERE r < f2)  -- the dataTab generates r records , depending on the property f2 of record in Table1

SELECT
tb.f1,
ta.r,
tb.fx
FROM dataTab ta
join Table1 tb
ON ta.f1 = tb.f1
ORDER BY ta.r;

witch is part of a package body.

The package body is ok when build outside Toad example Oracle SQL Developer tool or PL/SQL Developer tool. Even in toad the package can be run but does not compile.

Error shown is 'ERROR line 12, col 7, ending_line 12, ending_col 7, Found '(', Expecting: AS'  witch points to the with..... line of the statement


RE: WITH statement error on execute package body

$
0
0

Hi John,

Thanks for the reply. I have to say that the issue is not solved, and the issue rise when the statement is part of a package, this is the tricky part. The statement works fine, executes too from toad ( if compiled by another tool) but does not compile.

If I remove what you suggested the package body detects the procedure names in the navigator pane but than a new error:   PL/SQL: ORA-32039: recursive WITH clause must have column alias list 

witch of course does not compile the package. So have you tried this as part of a package body ?

RE: WITH statement error on execute package body

$
0
0

Yes, actually I did.  I created this package on Oracle 10.2 using Toad 10.1

CREATE OR REPLACE PACKAGE PKG_WITH_TEST IS

PROCEDURE INS_DEPT;

END PKG_WITH_TEST;
/

CREATE OR REPLACE PACKAGE BODY PKG_WITH_TEST IS
PROCEDURE INS_DEPT IS
BEGIN
insert into dept (deptno, dname, loc)
with data
as (select deptno, dname, 1 as loc from dept)
select * from data;
commit;
end;
end;
/

RE: WITH statement error on execute package body

$
0
0

I tried again, making my insert statement to look more like yours.   I had to create table1 like this:

create table table1 (f1 number, fx varchar2(30));

I still can make the error go away if I comment out the alias list

CREATE OR REPLACE PACKAGE PKG_WITH_TEST IS

PROCEDURE INS_DEPT;

END PKG_WITH_TEST;
/

CREATE OR REPLACE PACKAGE BODY PKG_WITH_TEST IS
PROCEDURE INS_DEPT IS
BEGIN
INSERT INTO dept
(deptno, dname, loc)
WITH dataTab
-- (f1, fx, r) -- error here if this is uncommented
AS
(SELECT 1 as f1, 'x' as fx, 2 as r
FROM dual
WHERE 1=1
UNION ALL
SELECT 2, 'y', 1+2
FROM dual
WHERE 4 < 5)
SELECT
tb.f1,
ta.r,
tb.fx
FROM dataTab ta
join Table1 tb
ON ta.f1 = tb.f1
ORDER BY ta.r;
commit;
end;
end;
/

Tablespace DDL

$
0
0

Hi Team

I am very fond of TOAD and want to see how toad is generating Tablespace DDL 

i tried to use SQL Tracker to see the script of Tablespace but i couldnt get the script that TOAD is using to generate the DDL

I tried DBMS_METADATA but its not giving me the correct way, where as TOAD is providing the correct way.

Can some one help me to get the Correct SCRIPT to pull the Tablespace DDL how toad is pulling the same way

Appreciate it.

RE: Tablespace DDL

$
0
0

Use Toad debug in a way that you choose menu item:

Database|Spool SQL|"Spool sql to screen"

This start "recording" everthing toad is doing in screen (lower tab window.

Choose command you like.

Then you could see what Toad is doing.

Wip process interface api takes too much time in R12.2.5 instance

$
0
0
Hello,


I have a performance issue in one private API of Proces interface of Work In Process " wip_movProc_priv.processIntf". It takes around 2.5 Minutes for all transaction and

When I run this API in R12.1.3 instance it not take this much amount of time.


Please help me.


Thanks,
Yasin Musani

RE: Tablespace DDL

$
0
0

We don't have a query that has the tablespace DDL as a result.   We build that out of the query results.

If you use Spool SQL or SQL Tracker, you'll see the queries that we run.  Everything you need is in the result of those queries.  


RE: Toad 12.10.0.30 Automation Designer

$
0
0

As we introduce new actions and new features to existing actions, we introduce data into those files that old versions of Toad just don't understand.

Those files are forward compatible, but not backwards compatible.

Toad 12.10.0.30 Automation Designer

$
0
0
I am trying to export actions from Toad v. 12.10.0.30 to Toad v. 12.0.0.61. When I try to paste the actions in the new app in the older version, I get the error "Unknown actions on the clipboard." If I try to import instead, I get the error "Unexpected properties exist in this datafile." How do I successfully share actions from the newer Toad to the older version?

removing objects from Team Coding

$
0
0
Hello,

I deleted a table but it is still showing up under Team Coding > Check-in all.
Is there a way to delete the entry from Team Coding?

Thanks,
Marie-Aude


RE: removing objects from Team Coding

$
0
0
Hi Marie,

If the table object is still listed in the Team Coding Manager, you should be able to right-click the table, and then go to Advanced -> Remove from Team Coding.  If it’s not, then simply close Toad and reopen it.  That should make sure it no longer appears in the Check-in All dialog.

-John

RE: removing objects from Team Coding

$
0
0
Hi John,
 
I closed and reopen and that took care of it.
Now I have a view that I am not able to check-in.  When I go to check it in, it doesn’t seem to “take”.
Any suggestion on that?
 
Thanks,
Marie-Aude
 
 
 

RE: Toad hangs

$
0
0

I had similar problem after upgrading (from v11 to v12-- but i don;t think the version was related to the problem)

Simple query execution and Toad hanged for 15-45s (displayed 0.0s executing) and when done displayed execution time of  < 200ms in the status bar)

It also hanged when i set focus to a different Windows program and then returned to Toad window.

Solution: Created a new subfolder under the default  C:\Users\[myID]\AppData\Local\Temp\

and set the General->Temp file directory option to point to it:

RE: Toad hangs

$
0
0

I'm a new forum user  and posted a reply an hour ago yet do not see it posted yet. Is Moderator very slow to post?


RE: Toad hangs

$
0
0

Looks like it was lost. Moderator, please recover it as i am not going to retype it from scratch.

RE: Toad hangs

$
0
0

Normally posts are not moderated at all unless the system "detects" an issue (language, spam, ...).  If they are, the moderator is usually very quick to respond.

RE: Toad hangs

$
0
0
No, I saw it when you first posted. 
Sometimes they will move it to a more appropriate thread, but they notify you by email about that.

RE: Toad hangs

RE: Toad hangs

$
0
0

I see it now. TImestamp "6:39pm"

Viewing all 4385 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>