/ issue

DazzaL

Member
Hi,

i have a sql script that i loaded into pl/sql dev (file.. open.. sql script) and tired to run (f*):

-- tlv.sql --
create type tag_length_value_typ is object(name varchar2(32767),
length integer,
value varchar2(32767));
/
create type tag_length_value_tab is table of tag_length_value_typ;
/------

in sqlplus or TOAD this works perfectly. In plsql developer it does not. What it ACTUALLY did was to create the tag_length_value_typ with the contents of the whole file..invalid of course.

Why does exhibit this behaviour? can pl/sql dev not handle this?

the only way to get this to work is run:
---
create type tag_length_value_typ is object(name varchar2(32767),
length integer,
value varchar2(32767));
--

then
---
create type tag_length_value_tab is table of tag_length_value_typ;
---

without the /'s (put them in and it complains! which is odd as according to oracle docets you need semi colons and forward slashes with types).

Daz.

this / problem also appears in packages..put them in and it complains of invalid chars...

Version: 5.1.2.682
 
My guess is that you are trying to run it in a SQL window, instead of a command window. The / is SQLplus, not Oracle SQL. Get your script, open a blank command window, paste you script in the Editor tab and hit F8. Chances are it will run just fine.

NOTE: The command window will interpret blank lines as command separators, I.e. no blank lines within your create statment. Marco said they would be looking into supporting SET BLANKLINES in a future release.

------------------
Hakuna Matata,

Arnoud.
 
But why does pl/sql developer strip out /'s when saving (eg i opened a view in dev and clicked save as.. i opened the saved file in ultraedit and it had no semi colon and no /. If i want to use pl/sql developer to develop my stuff, then save the files to a script for an overall installation script I have to go through all the files i saved and add the trailing slashes?!)
It also refuses to accept them when compliling packages.
 
Ah, yes, that is somewhat of a conundrum.

I do not speak for Allround Automations, and, in the relatively short time I have been working with the tool, this is what I am seeing as the PL/SQL Developer architecture:

You use PL/SQL Developer to do everything from, including creating views, tables, packages, etc. The project functionality allows you to "make" an application. Why then would you ever have the need to put things into SQLplus scripts? I am happy to take this approach, but I can see how that doesn't work for command line execution focussed organizations, or a tool independent approach.

I think you have an alternative though, put those SQLplus scripts in the project as command files. You would then use the program window, and other editors as scratch pads from which you copy when you are happy with the result. You put it - back - into a command file, and you're done.

------------------
Hakuna Matata,

Arnoud.
 
reason i need sqlplus etc is that i work on a large controlled project. Us developers use TOAD at present to do all of our development. We then save our work in sql scripts and give them to the deployment managers..The scripts then go through 5 or so environments (integration, vvt, customer acceptance) before even seeing production. This is all done through unix installation scripts and is done on evironments on which us devs have no access.
 
Then the alternative I mentioned earlier, is the only thing I can come up with.

Sorry I couldn't be of more help to you.

------------------
Hakuna Matata,

Arnoud.
 
The SQL Window is an interactive tool. You can execute just one single SQL statement at a time, view or edit result set in case of select statements, drill down to foreign key related tables, cursor fields and collections, switch between single-record/multi-record display, view resource statistics and query plans, export data, and so on. It cannot execute multiple statements separated by semi-colons. However, if you go to Tools > Preferences > SQL Window tab page, you can enable the "AutoSelect Statement" preference. Now the SQL Window will recognize that you have multiple statements in the editor, and will execute (and select) just the one under the cursor.

The Command Window is a batch-script and command-line oriented tool, which can execute multiple statements simultaneously and offers a certain level of SQL*Plus compatibility.

------------------
Marco Kalter
Allround Automations
 
Back
Top