| |

VerySource

 Forgot password?
 Register
Search
Author: wang7498

I was in contact with ORCALE for the first time today.

[Copy link]

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-16 15:45:01
| Show all posts
sqlserver oracle is different
Don't mix together
Reply

Use magic Report

2

Threads

21

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

 Author| Post time: 2020-5-17 18:45:01
| Show all posts
Hey ... can't hold it ... how complicated it is ... hey.
Again.

CREATE OR REPLACE PROCEDURE MYTEST
(CODE VARCHAR2)
AS
BEGIN
  DBMS_OUTPUT.PUT_LINE (CODE);
END;
I execute this first, the test directly using PL / SQL can pass, and the output is correct.
Then I want to execute this through the statement.
EXECUTE MYTEST ('AA')
Then the same error is prompted. I didn't understand the one you wrote ET_STATISTICS. "TEST_ll" (CODE);
Ha ha.

I have always used SQL SERVER .. Ha ha. Suddenly not used to it.
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-18 01:45:01
| Show all posts
Then the same error is prompted. I didn't understand the one you wrote ET_STATISTICS. "TEST_ll" (CODE);
-------------------------
CREATE OR REPLACE PROCEDURE "TEST"

Your original stored procedure definition uses double quotes
Therefore, double quotes should also be used when executing
================================================== ===============
I have never used the PL / SQL tool
Test it like this
begin
EXECUTE MYTEST ('AA');
end;
Reply

Use magic Report

2

Threads

21

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

 Author| Post time: 2020-5-18 15:45:01
| Show all posts
COPY your code. Nothing changed.
CREATE OR REPLACE PROCEDURE "TEST_ll"
(CODE IN CHAR)
AS
BEGIN
  DBMS_OUTPUT.PUT_LINE (CODE);
END;

/
toad test
DECLARE
  CODE VARCHAR2 (200);

BEGIN
  CODE: = 'AA';

  ET_STATISTICS. "TEST_ll" (CODE);
  
  COMMIT;
END;

Execution error.
Prompt error:
ORA-06550: row 7, column 3
PLS-00201: The identifier 'ET_STATISTICS.TEST_ll' must be stated
ORA-06550: row 7, column 3
PL / SQL: Statement ignored

After working hard for decades, I went back to liberation overnight,
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-19 12:00:02
| Show all posts
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-19 12:15:01
| Show all posts
toad test
DECLARE
  CODE VARCHAR2 (200);

BEGIN
  CODE: = 'AA';

  ET_STATISTICS. "TEST_ll" (CODE);
  
  COMMIT;
END;

--- ET_STATISTICS is a user on my side, you can change to your own user
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-19 14:00:01
| Show all posts
toad test
DECLARE
  CODE VARCHAR2 (200);

BEGIN
  CODE: = 'AA';

  "TEST_ll" (CODE);
  
  COMMIT;
END;
Reply

Use magic Report

2

Threads

21

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

 Author| Post time: 2020-5-19 17:30:01
| Show all posts
CREATE OR REPLACE PROCEDURE MYTEST
(CODE VARCHAR2)
AS
BEGIN
  DBMS_OUTPUT.PUT_LINE (CODE);
END;

EXECUTE MYTEST ('AA');
Execution error, prompt: ORA-00900 invalid SQL statement
I also feel strange. How can something very simple go wrong?

The statement should be all right ... I don't know what's going on.
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-19 19:45:01
| Show all posts
I have never used the PL / SQL tool
Test it like this
begin
EXECUTE MYTEST ('AA');
end;

-Isn't that alright?
Reply

Use magic Report

0

Threads

39

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-5-20 14:45:01
| Show all posts
CREATE OR REPLACE PROCEDURE TEST_ll_01
(CODE IN CHAR)
AS
BEGIN
  DBMS_OUTPUT.PUT_LINE (CODE);
END;

sqlplus test

set serveroutput on;
begin
user.test_ll_01 ('aa'); --user is replaced with your own user
end;

Test passed
The result is aa
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list