MickyMc
asked on
Cant execute command usiing Execute Immediate in TOAD
Hi All,
I,ve done this before and this is wrecking my head. I,m in toad in an SQL Editor and want to test some code so I can put in my script. I have to create an index set so I can use cat search. When I tried to use Execute Immediate I kept getting ora----900 error. So then I tried something simple like
execute immediate 'Select sysdate from dual;'; and got the same error. I have done something similar in packages and run them in toad so my head is wrecked. What am I missing - thanks Mick - wannabee DBA :-)
I,ve done this before and this is wrecking my head. I,m in toad in an SQL Editor and want to test some code so I can put in my script. I have to create an index set so I can use cat search. When I tried to use Execute Immediate I kept getting ora----900 error. So then I tried something simple like
execute immediate 'Select sysdate from dual;'; and got the same error. I have done something similar in packages and run them in toad so my head is wrecked. What am I missing - thanks Mick - wannabee DBA :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
glad we could help
ASKER
thanks sbstube.... just one last quick one. Ive hit another similar issue trying to create an index set to use catsearch on. Heres my script if you could look at it....
BEGIN
EXECUTE IMMEDIATE 'CTXSYS.CREATE_INDEX_SET (''IDXSET_RECKEYWDDATEDESC '')';
COMMIT;
Ive also tried CTXSYS.CTX_DLL.Create_Inde x_set and CTX_DLL.Create_Index_set inside the execute but cant get it to run.
I can create the index alright but not the index -set. I,m using Toad again. I,ve also tried using quotes around the statement and without them. Any ideas
Begin
Execute immediate ('CREATE INDEX RECORD.IDX_REC_KEYWD_DATE_ DESC ON RECORD.RECORD (Keywords) INDEXTYPE IS CTXSYS.CTXCAT');
End;
BEGIN
EXECUTE IMMEDIATE 'CTXSYS.CREATE_INDEX_SET (''IDXSET_RECKEYWDDATEDESC
COMMIT;
Ive also tried CTXSYS.CTX_DLL.Create_Inde
I can create the index alright but not the index -set. I,m using Toad again. I,ve also tried using quotes around the statement and without them. Any ideas
Begin
Execute immediate ('CREATE INDEX RECORD.IDX_REC_KEYWD_DATE_
End;
"cant get it to run"
what happens? lock up, error message, machine catches fire, car stalls, Ralph Nader wins election?
In any case, I would try it like this...
begin
ctxsys.ctx_ddl.create_inde x_set('IDX SET_RECKEY WDDATEDESC ');
end;
what happens? lock up, error message, machine catches fire, car stalls, Ralph Nader wins election?
In any case, I would try it like this...
begin
ctxsys.ctx_ddl.create_inde
end;
ASKER
Much appreciated Mick