how to get PL/SQL in SQLFiddle?
Asked Answered
T

1

16

Any clues how to get PL/SQL in SQLFiddle?

I've tried

begin
 dbms_output.put_line('Hello World');
end;
/

or

begin
 null; 
end;
/

which works in SQL*Plus (or TOAD or SQLDeveloper or ...) but SQLFiddle just gives me

ORA-06550: line 2, column 36: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; : begin dbms_output.put_line('Hello World')

So it seems there is some kind of PL/SQL engine in place but I can't figure out how to get it to parse anonymous program units.

See for example http://www.sqlfiddle.com/#!4/db36d/4

Teleutospore answered 14/7, 2012 at 11:41 Comment(8)
You have a dropdown button below right where you can toggle the query terminator.Didst
This is not a troubleshooter for SQL Fiddle. Jake was trying to stop people executing PL/SQL on there. Maybe he succeeded?Plummy
@Ben: Yes, most probably. But as sqlfiddle is done by a stackoverflow member and quite heavily used here I thought this would be ok. Where would have been the appropiate place?Teleutospore
@Plummy - I've given up on attempting to prevent such things. There is potential for abuse, but there are some controls (such as profile limits, as Justin Cave answered in that question) that help mitigate the issue. Also, I'm putting a little trust in the community that they won't be too actively trying to break things with malicious code :)Diet
@JakeFeasel, I wouldn't advertise it if that's the case :-). Doesn't this question show you how stop it on Oracle? Just remove one of the query terminators?Plummy
@ben not really - often the semicolons are optional, anyway. I have changed my mind a bit, from back in the early days. I've even changed the permissions to allow custom functions and stored procs. So far so good :)Diet
@Ben: I don't get why this downvoted or considered off-topic. The FAQ states: "if your question generally covers … software tools commonly used by programmers". What's the difference between sqlfiddle and say SQL*Plus or Crystal Reports? There are tons of questions on programming tool usage here and not only about algorithms. At least 4 other people found this useful and upvoted question and answer. But anyway, that's probably the "wikipedia" part of stackoverflow (in its negative, relevancy discussion aspect). Sigh.Teleutospore
@GWu, I don't know why this was downvoted either as I didn't do it. If you believe this was unfairly closed you can always bring this up on meta and you'll get the views of many more people who may reopen the question. The people who closed it last time cannot vote to close so there will be no closing war . Be warned that votes mean something different on meta though .Plummy
T
14

As @Lieven correctly pointed out: There is a button below right where you can toggle the query terminator to /.

Working example at http://www.sqlfiddle.com/#!4/db36d/5

Teleutospore answered 14/7, 2012 at 11:59 Comment(1)
This link gives Oops! Something went wrong. Try it again and if this keeps happeningHandling

© 2022 - 2024 — McMap. All rights reserved.