Thursday, April 26, 2007

Oracle sucks, part 1 of 1000:executing queries vs scripts

I just have to blog this to remember in the future, and hopefully blog about other countless issues with Oracle

This applies to running multiple statements to create functions, views, etc

When running as a query:
when creating or replacing functions, include ";", at the end, then a "/" on the next line
when creating or replacing views, don't include the ";", but include "go"

otherwise you'll get things like
" Warnings: --->
W (1): Warning: execution completed with warning
<--- "

"[Error] Script lines: 639-664 ----------------------
ORA-06575: Package or function FUNCTION_NAME is in an invalid state"

and your functions/views won't be modified

when running as a script, everything needs ";" at the end

No comments: