Same code running in SQL * more edit the sql buffer vs = different results file

Hello

For the last few minutes I was scratching my head trying to understand why my little piece of code was not working.
As a result, a sample:
create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
/
declare
  booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');  
begin
  for i in booklist.FIRST .. booklist.LAST LOOP
    dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  end loop;
end;
/
When run interactively, I get the following results:
  1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
  2  /
  3  declare
  4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
  5  begin
  6    for i in booklist.FIRST .. booklist.LAST LOOP
  7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  8    end loop;
  9* end;
SCOTT@ORCL> /

Warning: Type created with compilation errors.

SCOTT@ORCL> show errors
Errors for TYPE BOOKTITLES_NT:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1      PLS-00103: Encountered the symbol "/"
So I try without the slash and get nowhere:
  1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
  2  declare
  3    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
  4  begin
  5    for i in booklist.FIRST .. booklist.LAST LOOP
  6      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  7    end loop;
  8* end;
  9  /

Warning: Type created with compilation errors.

SCOTT@ORCL> show errors
Errors for TYPE BOOKTITLES_NT:

LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1      PLS-00103: Encountered the symbol "DECLARE"
8/4      PLS-00103: Encountered the symbol "end-of-file" when expecting
         one of the following:
         ( begin case declare end exception exit for goto if loop mod
         null pragma raise return select update while with
         <an identifier> <a double-quoted delimited-identifier>
         <a bind variable> << continue close current delete fetch lock
         insert open rollback savepoint set sql execute commit forall
         merge pipe purge
So I think, maybe I'll try it in a .sql file. So I put the first fragment of code in a file, test4.sql:
SCOTT@ORCL> get C:\Users\J\Documents\SQL\test4.sql
  1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
  2  /
  3  declare
  4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
  5  begin
  6    for i in booklist.FIRST .. booklist.LAST LOOP
  7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  8    end loop;
  9* end;
SCOTT@ORCL>
and run it, and it works:
SCOTT@ORCL> @C:\Users\J\Documents\SQL\test4.sql

Type created.

Book number 1:Great Expectations
Book number 2:Ulysses
Book number 3:1984

PL/SQL procedure successfully completed.
Can someone tell me why the behavior is different when it is run from a file when it is run, well, interactive? There seems to be some limits on what you can interactively run vs. what you can run from a script.

Thank you very much
Jason

SQL * more buffer cannot contain more than one return, even if you have two - create type and anonymous PL/SQL block. Thus it-error:

Wrote file afiedt.buf

  1  create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
  2  /
  3  declare
  4    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
  5  begin
  6    for i in booklist.FIRST .. booklist.LAST LOOP
  7      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  8    end loop;
  9* end;
SQL> /

Warning: Type created with compilation errors.

SQL> create or replace type booktitles_nt is TABLE OF VARCHAR2(100);
  2  /

Type created.

SQL> declare
  2    booklist booktitles_nt := booktitles_nt('Great Expectations','Ulysses','1984');
  3  begin
  4    for i in booklist.FIRST .. booklist.LAST LOOP
  5      dbms_output.put_line('Book number ' || i || ':' || booklist(i));
  6    end loop;
  7  end;
  8  /
Book number 1:Great Expectations
Book number 2:Ulysses
Book number 3:1984

PL/SQL procedure successfully completed.

SQL>

SY.

Tags: Database

Similar Questions

  • Use the same code module to multiple steps in the sequence

    Hi all

    I tried to implement a sequence that uses the same code for all steps module in the order, but I'm not returning to it when I need to send it commands.  I got regarding the appellant the VI in a new thread so that it can be executed asynchronously.  I can run the simple sequence and it will indeed open the VI and move to the next step.  When I close the VI manually from the front, the TestStand sequence is completed, as planned.  So it turns out that I have a lot more work.

    My question is how to call the thread separate from the main sequence and other sequences overtime when I need to change the settings.  If I insert a step in the Action, I have to select a file of VI, but from what I can tell, it opens another instance of the file and does not provide an interface with the other asycronously running instance.  My next guess was to use a stage of education, but I was not able to understand how to configure the search string to call the VI settings.  In addition, I don't know how to proceed.  Please notify.

    My intention is to start the module code (asynchronously) VI, run several different subsequences in the main sequence, which call this same VI and edit its settings, close everything and report the results.  If I'm understand how TestStand is supposed to work, please let me know.

    Thank you

    GSinMN

    What I do is use a queue to send data to the asynchronous VI.  So he can run and whatever, but also receive orders from the queue.  I use a motor of Action that contains the reference to queue and sends the commands.  If you really just call the engine of the Action of your sequences.

  • SQL query return different result 11 GR 1 material and GR 11, 2

    Problem: SQL returns different results in 11 GR 1 material and GR 11, 2 games.

    Example script:

    create the table tab_main
    (
    SOS number (2) not null,
    contract number (2) null
    )
    /

    create the table tab_sub
    (
    number (2) of contract non-null,.
    SOS number (2) null
    )
    /

    insert into tab_main values (1, 10);
    insert into tab_main values (2, 20);
    insert into tab_main values (3, null);
    insert into tab_main values (4, null);

    insert into tab_sub values (1, 10);
    insert into tab_sub (20, 2) values;
    commit;

    The SQL code:

    SELECT *.
    OF tab_main.
    tab_sub
    WHERE tab_main.sos = tab_sub.sos (+) AND
    tab_main. Contract = tab_sub.contract (+) and
    tab_main. Contract not in (select 1 of the double);

    The above query gives more results
    -by 11.2.0.4
    1 10 10 1
    2 20 20 2

    -in 11.1.0.7
    1 10 10 1
    2 20 20 2
    4
    3


    Please tell us what could be the reason for the behaviour of offset lines thie.


    Thank you

    Piesset

    I think it is probably a bug in 11.1.0.7 (and possibly other versions), I get the same results as your 11.2.0.4 9.2.0.7, 10.2.0.3 and 11.2.0.3, and this is the result, I expect.

    Your not in the paragraph is equivalent to:

    SELECT *.

    OF tab_main, tab_sub

    WHERE tab_main.sos = tab_sub.sos (+) AND

    tab_main. Contract = tab_sub.contract (+) and

    tab_main. Contract <> 1;

    Since you have null values in tab_main.contract they are lost by the predicate since null = value is never true (or false).

    John

  • DATE arithmetic in v SQL SQL Developer Studio - different results

    Hello

    I want a date picker by default for Monday of this week. I'm using TO_CHAR with a format mask so that should give me the number of the day of the week:

    SELECT SYSDATE, to_char(SYSDATE, 'D')
    FROM dual
    

    I get the APEX SQL workshop,

    09/25/2013  4
    

    bad - today is Wednesday.

    Gives the same code in SQL Developer

    25-SEP-13  3
    

    What is correct.

    Am I missing some APEX here which determines the beginning of the week (Monday Sunday v)?

    Thank you very much

    Brian

    Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production

    APEX 4.2.2.00.11

    Windows Server 2008 R2 Enterprise

    I'm guessing that: (from the Oracle documentation)

    The datetime format element D returns the number of the day of the week (1-7). The day of the week that is numbered 1 is implicitly specified by the initialization parameter NLS_TERRITORY .

    For me:

    Select sysdate, to_char(sysdate,'D'), to_char (sysdate, 'Day') of double;

    25 SEP-13 4 Wednesday

    Which is (for me) correct. (Sunday == 1)

    What have we learned?

    NLS_TERRITORY may be different depending on who/how/when the DB connection is made.

    It's the same as NLS_DATE_FORMAT.

    Solution:

    Never trust anything that depends on them, unless the code explicitly sets the value.

    That's why ALWAYS provide you the date format converting string to date using the TO_CHAR();

    MK

  • "The eigenvalues and the vectors.vi" produce different results in BT 7.0 and 8.0

    I noticed that 'clean and vectors.vi values' product of different results when it is used in LV8.0 and LV7.0.

    The attached VI is saved in LV7.0.  The default values show the results by operating this VI in LV7.0.

    Using the same entries, try running this VI in 8.0 and you will see the results change.

    Someone has any ideas why this is happening?


  • OBIEE logical column has same SQL but returns different results

    I have a SQL query with a case statement that returns the correct results by operating in Oracle SQL Developer. I've created several logical columns in OBIEE, one for each case in the original query. However, the results returned by each logical column OBIEE are radically different from the original SQL query results, even if the SQL code is virtually identical.

    For example, a column logical OBIEE that returns incorrect results contains the following SQL code:

    SUM (CASE when

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '% a %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%B %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%c %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"% %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%G %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"hour %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"%%J") or

    ("Registration - College". "" Effective colleges F. ("' Postal code ' like '%R %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%s %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%T %') or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like"% %") or

    ("Registration - College". "" Effective colleges F. ("" Postal code "like '%x %') or

    ("Registration - College". "" Effective colleges F. ("' Postal code ' like '%Y %')

    THEN 0 OTHERWISE 1 END)

    The case statement in the original SQL query, which returns the correct results, is as follows:

    CASE

    WHEN (postal_zip_code_permanent like "%%K") or (postal_zip_code_permanent like '% %') or (postal_zip_code_permanent like '%m %') or (postal_zip_code_permanent like '%n %') or (postal_zip_code_permanent like "%p %") THEN "Ontario".

    WHEN (postal_zip_code_permanent like '% a %') or (postal_zip_code_permanent like '%B %') or (postal_zip_code_permanent like '%c %') or (postal_zip_code_permanent like '% %') or (postal_zip_code_permanent like '%G %') or (postal_zip_code_permanent like "%hour") or (postal_zip_code_permanent like "%%J") or (postal_zip_code_permanent like "%%R") or (postal_zip_code_permanent like '%s %') or (postal_zip_code_permanent like '%t %') or (postal_zip_code_permanent like '% %') or (postal_zip_ code_permanent like '%x %') or (postal_zip_code_permanent like "%%Y") THEN "Canada, other than Ontario.

    WHEN (substr(postal_zip_code_permanent,1,1) IN ('1 ', '2', '3', '4', '5', '6' ', 7',' 8 ', ' 9',' 0') or (postal_zip_code_permanent like '%d %') or (postal_zip_code_permanent like '%f %') or (postal_zip_code_permanent like ' % I %') or (postal_zip_code_permanent like "% O") or (postal_zip_code_permanent like "%%Q") or (postal_zip_code_permanent like "%%U") or (postal_zip_code_permanent like ' % W ') or (postal_zip_code_permanent like "%%Z")) THEN 'other')

    WHEN (postal_zip_code_permanent like '% + %') or (postal_zip_code_permanent like '%. %') or (postal_zip_code_permanent like ' %? %') or (postal_zip_code_permanent like '% %') or postal_zip_code_permanent IN ('+ ','.', '?)) (',',') And THEN "Invalid."

    WHEN postal_zip_code_permanent is null THEN 'Blank '.

    Of OTHER postal_zip_code_permanent

    END

    Now I see what the problem was. In the original SQL query, each condition is exclusive, for each record will only be categorized in one of the scenarios WHEN. But in OBIEE, each logical column is autonomous, so some records were classified into more than logical column, even if each logical column was supposed to be exclusive.

  • How do the reading of bar codes that share with keyboard via the keyboard buffer?



  • Different results from the the DLL source code

    Hi all

    I'm new to this forum and also to labview so understandable...

    Then, I got a source project with many under vi of that graphic plots of excel files. I also got the exe after generation.

    The problem is, if I try to compile this project again, the exe gives me different results than what I already have. They should be the same, because I does no update in the source code.

    Can someone explain this behavior? I don't know anything about how it has been made because the guy who create this left the office... I need to make a few updates, but first of all, I have to build corectly.

    Thank you

    Have you compared the date of the exe file with the date of the source code? Are you absolutely sure that no changes have been made to the source code after the build? The construction specifications are part of the project. Unless you changed something there, builds should be the same.

    You have the source code control? Issues like this should not be a if you make and use wisely.

  • Download FTP &gt; continue editing the bug?

    Working on a file in code view.

    Press cmd + s to save

    Press shift + cmd + you to download changes

    Once downloaded, the code in the file mode is deselected. If I click once, the cursor appears, but everything I type does not any change in the code. To continue to edit the file, I have to click again on the code and then the cursor starts blinking and I can change my code.  This also happens if I select a piece of code.  It will highlight, but I can't edit it until it has been clicked on new.

    This interrupts my workflow because I am very used to click once to start a file changes and sometimes I'll quickly notice a change, click once and start trying to delete the code at the location of the cursor, or a code I chose. This will display a prompt asking if I want to delete the file selected in the files window, or tells me that I can't delete the folder root of my site.  It's confusing, even for someone like me who creates backups before you start making changes.

    I checked also that this happens only in mode code design mode, I only click once to return to editing.

    Plug-
    MacBook pro unibody
    Intel dual core i5 2.53 mhz
    4 GB of ram
    last updated dreamweaver CS6 (12.1 build 5949)
    It's a creative cloud version if that makes a difference

    Hello

    This problem has been fixed in the CCM update of 12.2. Please upgrade to this latest version.

    -Jones

  • When you try to find the IP address of my computer, I see two different results with two different numbers. Which is accurate?

    original title: a different output for ping - an IP address

    I am trying to determine the name of the computer to an IP address

    When I open a command prompt in a computer (Windows XP connected to our domain) and type ping - a [IP address], I get a result

    When I open a command prompt in another computer (Windows Server 2008 connected to the WORKING group) and type ping - a [IP address], I get a different result

    And there are other times when ping - [IP address] will display the name of the computer on a computer (usually the Windows Server 2008), but not the other

    I tried to google

    1. why this happens

    2. what result is correct

    Please specify.

    The order of DNS in Windows name resolution is as follows:

    1. Name of the local host (file Hosts Local generally in c:\windows\system32\drivers\etc\hosts)
    2. Cache Client DNS resolution
    3. DNS server
    4. Cache of NetBIOS names
    5. WINS server
    6. NetBIOS broadcasts
    7. File LMHosts (same location as the HOSTS file)

    The reason you get different results could be because machines could be on different subnets (different results for broadcast), using a different DNS server machines or are configured for different WINS servers, or the names are already cached because of prior activity.

    HTH,
    JW

  • Read the last value of a large file of PDM

    Hello everyone!

    I hope someone can help out me with this one.

    I try to put in place a program that can read the last value of one of the large channels of different TDMS files but I just can´t find a way to do it.

    I would appreciate help for my little problem.

    Thank you very much in advance for your support.

    Kasim.

    Hello

    You can use the following playback TDMS Set Position feature included in the PDM API.  This function receives a parameter called "(0:start)", which can be set to 1 to go to end of the file.  In this way, you can read the last value written to the PDM file.

    I hope this helps!

    Anuar Rojas

  • Prevent all instances of a table to run the same code set?

    Hi, as the title suggests, how would you prevent that from happening? Basically, I have a game where the players reproduce units that move automatically to the point of arrival, and there towers throughout the screen which fires to the unit, the unit is in the range. However, the towers that I put in a table all draw to the device when it has reached in the range of one of the towers. (To say things in a different way, I have 3 turns on screen, everyone is supposed to get their own range. However, when the device comes in range of one of the towers, all 3 rounds fire.) In addition, because of the executed code three times, towers fire 3 balls at once more, makes the health of the device decreases by 3 instead of 1. Any help would be appreciated. Thank you! Here's the part of my code. Most of the code for tables is in my Main.as.

    private function level1(e:MouseEvent):void
            {
                gotoAndStop(1, 'level1');
                //Initialise variables
                //Variables for Creep 1
                buttonCreep1 = new btnCreep1;
                stage.addChild(buttonCreep1);
                buttonCreep1.x = 0;
                buttonCreep1.y = 600;
                //Variables for Creep 2
                buttonCreep2 = new btnCreep2;
                stage.addChild(buttonCreep2);
                buttonCreep2.x = 100;
                buttonCreep2.y = 600;
                //Arrays for Creeps
                creep2Array = new Array;
                creep1Array = new Array;
                //Arrays for towers
                tower1Array = new Array;
                tower1BulletArray = new Array;
                //PLACE TOWER POSITIONS HERE
                var tower1New1:MovieClip = new mcTower1;
                tower1New1.x = 313;
                tower1New1.y = 340;
                tower1Array.push(tower1New1);
                MovieClip(root).addChild(tower1New1);
                //
                var tower1New2:MovieClip = new mcTower1;
                tower1New2.x = 590;
                tower1New2.y = 340;
                tower1Array.push(tower1New2);
                MovieClip(root).addChild(tower1New2);
                //
                var tower1New3:MovieClip = new mcTower1;
                tower1New3.x = 466;
                tower1New3.y = 180;
                tower1Array.push(tower1New3);
                MovieClip(root).addChild(tower1New3);
                //
                //Other Variables
                money = 500;
                gamePaused = false;
                currentLevelMinutes = 0;
                currentLevelSeconds = 0;
                //Event Listeners
                stage.addEventListener(Event.ENTER_FRAME, update);
                buttonCreep1.addEventListener(MouseEvent.CLICK, spawnCreep1Lv1);
                buttonCreep2.addEventListener(MouseEvent.CLICK, spawnCreep2Lv1);
                btnBack.addEventListener(MouseEvent.CLICK, exitLevel);
                btnPause.addEventListener(MouseEvent.CLICK, pauseGame);
                btnResume.addEventListener(MouseEvent.CLICK, resumeGame);
            }
    
    private function update(e:Event):void
            {
                //trace ("update function is working")
                creep1Lv1();
                creep2Lv1();
                tower1Handler();
                pauseControl();
                timeControl();
                updateTimeTxt();
                //trace (tower1BulletArray.length);
                //trace (creep1Array.length);
            }
    
    private function tower1Handler():void
            {
                for (var i:int = tower1Array.length - 1; i >= 0; i--)
                {
                    var tower1 = tower1Array[i];
                    tower1.tower1Update();
                    if (!tower1.isReady())
                        continue;
                    for each (var creep1:mcCreep1 in creep1Array)
                    {
                        if (tower1.canShoot(creep1))
                        {
                            tower1Fire(tower1, creep1);
                            tower1.gotoAndPlay(110);
                            tower1.reset();
                            break;
                        }
                    }
                }
            }
            
            private function laser1Handler(e:Event):void
            {
                //Make laser move in direction of turret.
                var newLaser1:MovieClip = e.currentTarget as MovieClip;
                newLaser1.x += Math.cos(newLaser1.rotation * Math.PI / 180) * laser1Speed / creep1Array.length;
                newLaser1.y += Math.sin(newLaser1.rotation * Math.PI / 180) * laser1Speed / creep1Array.length;
                for (var i:int = creep1Array.length - 1; i >= 0; i--)
                {
                    var thisCreep = creep1Array[i];
    
                    //Boundary checking
                    if (newLaser1.x < -50 || newLaser1.x > 800 || newLaser1.y > 600 || newLaser1.y < -50)
                    {
                        newLaser1.gotoAndPlay(2);
                        tower1BulletArray.splice (0, 1);
                    }
                    else if (newLaser1.hitTestObject(thisCreep))
                    {
                        newLaser1.gotoAndPlay(2);
                        newLaser1.removeEventListener(Event.ENTER_FRAME, laser1Handler);
                        tower1BulletArray.splice (0, 1);
                        if (thisCreep.currentLabel == "ChickenIdel" || thisCreep.currentLabel == "chickenIdle")
                        {
                        if (thisCreep.updateHealth(-1) <= 0)
                        {
                            thisCreep.gotoAndPlay(201);
                            creep1Array.splice(i, 1);
                        }
                        }
                    }
                    
                }
            }
    
    

    It's my mcLaser1.as file.

    public class mcLaser1 extends MovieClip 
        {
            
            public function mcLaser1() 
            {
                stop();
                var angle:Number;
                addEventListener(Event.ADDED_TO_STAGE, onAdd);
            }
            
            private function onAdd(e:Event):void 
            {
                removeEventListener(Event.ADDED_TO_STAGE, onAdd);
                addEventListener(Event.ENTER_FRAME, bullet1Loop);
            }
            
            private function bullet1Loop(e:Event):void 
            {
                if (currentLabel == "destroyedComplete")
                {
                    destroyBullet1();
                }
            }
            
            public function destroyBullet1()
            {
                this.parent.removeChild(this);
                removeEventListener(Event.ENTER_FRAME, bullet1Loop);
            }
            
        }
    

    In addition, when a bullet kills a creep, and there is no another goose bumps left on the stage, all the other balls is simply disappear.

    Any help would be appreciated. Thank you!

    for each (var tower1:mcTower1 in tower1Array)
                {

    won't.  There should be no loop for in this function.  use:

    private function tower1Fire(tower1:mcTower1, creep:mcCreep1):void
            {
    
                    var angle:Number = Math.atan2(creep.y - tower1.y, creep.x - tower1.x) / Math.PI * 180;
                    var newLaser1:mcLaser1 = new mcLaser1();
                    newLaser1.rotation = angle;
                    newLaser1.x = tower1.x + Math.cos(Math.atan2(creep.y - tower1.y, creep.x - tower1.x) / Math.PI * 180 * Math.PI / 180) * 60;
                    newLaser1.y = tower1.y + Math.sin(Math.atan2(creep.y - tower1.y, creep.x - tower1.x) / Math.PI * 180 * Math.PI / 180) * 60;
                    newLaser1.addEventListener(Event.ENTER_FRAME, laser1Handler);
                    tower1BulletArray.push(newLaser1);
                    addChild(newLaser1);
    
            }
    
    
    

    and I don't see where you are by checking if a creep is at the tower.

  • How to make SQL * more count the comment and blank line numbers?

    Hello

    Parameter
    Value of the parameter
    Oracle versionEnterprise Edition Release 11.2.0.1.0 - 64 bit
    OPERATING SYSTEMLinux Fedora Core 17 (X86_64)

    I would like to know, is it possible to force SQL * Plus to provide the number of the current in the source file line whenever there is an error? I often put in the first line of my script SQLBLANKLINES the VALUE ON that I may be able to put several consecutive blank lines in my code (I do that sometimes, when I find that it is appropriate to make my code more readable or a sequence of instructions which I believe make their logic more comprehensible for the reader of the Group)

    Now the problem is that SQL * Plus will ignore these empty lines and whenever there is an error, the line number in the error message does not match the actual line number in the source file, but it seems to be the last non-empty line in the file.  Consider the following example:

    SET SQLBLANKLINES ON;

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN


       
        var := 20
    END;
    /

    In the code above on line 9 (also counting blank lines), there is an error (no semicolon at the end of the var: = 20) but when I run the script

    SQL * also, here is the error message I get


    SQL > @myscript.sql;

    END;

    *

    ERROR on line 8:

    ORA-06550: line 8, column 1:

    PLS-00103: encountered the symbol "END" when expected in the following way:

    * & = - + ; <>/ is mod remains not rem

    < an exponent (*) > <>or! = or ~ = > = < = <>and like2 or

    like4 likec between | submultiset of type multiset Member

    The symbol ';' was replaced by 'END' continue.


    SQL >


    As you can see the error message indicates that the error was found on line 8, while in the file, it's really on line 9

    As long as the number of lines in the script is limited, this may not be a problem and we can quickly find the actual line number in the code that causes the error, but for a code, including hundreds (or even thousands) of lines and with many comments and blank lines, find line number given by SQL * error message more becomes complicated.

    So my question: is it possible to make SQ * more properly draw the line numbers, as they appear in the source file?

    Thanks in advance,

    Kind regards

    Dariyoosh

    Hi, Dariyoosh,

    The line numbers in error messages are always from the beginning of the statement, but not the file.  The back-end which checks the errors and generates the error message, has no idea if this statement has appeared in your file, even if the statement was in a file at all, or if it comes from multiple files, each with its own line 1.

    You can divide your scripts into parts, so that the long statements, which may lead to error messages, are each in a separate file, so the statement starts on the line 1 of the file.

    For example, you can call a script called fubar.sql, which looks like this:

    SET SQLBLANKLINES ON;
    
    @@fubar_1
    

    Which calls another script, called fubar_1.sql, located on the same directory as fubar.sql, that looks like this

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN
    
        var := 20
    END;
    /
    

    You never call him directly fubar_1.

  • How I can run pl/sql express edition? PLSS help me.

    I am trying to run pl/sql statements in oracle 10 g express edition, but it does not work! What can I do? What program can I download to run pl/sql?

    pls help me!

    Thank you.

    Code:
    ---------------------------------------------------------------------------------
    SET SERVEROUTPUT ON

    DECLARE
    v_count NUMBER (2): = 1;
    BEGIN
    LOOP
    DBMS_OUTPUT. Put_line (v_count);
    v_count: = v_count + 2;
    WHEN the EXIT v_count > 10;
    END LOOP;
    END;
    ---------------------------------------------------------------------------------

    Error code:

    ORA-00922: missing or not valid option

    Version:

    Oracle Database 10 g Express Edition Release 10.2.0.1.0 - product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    Published by: user8944100 on 24.Oca.2010 12:31

    Published by: user8944100 on 24.Oca.2010 12:37

    user8944100 wrote:
    by the way that Mr. Alex Nuijten when I fail "set serveroutput on ', it works, is this problem cause :(

    You use SQL Workshop in the APEX, the "SET SERVEROUTPUT ON" is a SQL * more order - which is not included in the workshop of SQL...
    So, Yes, that's your problem... now you can close the message and mark it as answered...

  • What happens when two computers call the same code stored in networked storage?

    We have our code on the network storage and have worked on a single computer code.  We have now replicated our configuration and want to use the same code to run the new installation to another computer.  We want to run simultaneously both configurations (both using the same storage networking code).  Will there be conflicts here, or both computers load their own copy of the vi to run from?  I must say that we do not have global variables.

    I am interested in the answer to this question anyway, but I'd be happy to hear any suggestions (or even critical) on how to do what we do.

    You should seriously consider a source control system, which is the best solution here. This gives you an original copy of the code on the network. Each computer retrieves the latest revision of the source control, make a copy on the local disk. Source control keeps a good backup and allows you to track and compare the versions or to return to the old code, when something breaks.

    I'm fairly certain that you can open the same screw that is stored on a network drive on multiple computers simultaneously. Global variables are not relevant here. Each computer is independently responsible for the screw in memory. The problem is if edit you and save the VI on a computer while it is open on another, and if you make changes on both at the same time, will certainly lose you some of her edits and could possibly corrupt your VI and lose all, that's why you should use a source code control system.

    If you have the request of the manufacturer, I recommend your building code in an application. You can store the network application if you want and run it on multiple computers.

Maybe you are looking for

  • HP Officejet Pro e-all-in-8620: unable to print on the printer 8620

    I installed the printer and e-print ok since all devices work. Wireless printing function works well for all my other computer (windows 10) except that I can't get my Sony SVT131A11L computer to print to the HP 8620 wireless. My Sony computer will pr

  • Is there a site that has a variety of useful accessories of rocket?

    I love my rocket and use it all the time, but I would like something like a wake-up call or any other accessory pregnant) that I could plug my rocket (which is made especially for the "rocket", not something that uses only a 3.5 mm headphone jack). T

  • BlackBerry Z10 Z10 BlackBerry 3 G does not connect automatically

    Hi, I recently bought Z10 and I use BB Services provider. I noticed a strange problem which Z10 is unable to connect to 3G when I'm out of the office or at home. in both places I have Wifi and Z10 connects as soon as I get to the coverage area. When

  • My email for BBM BBM has been used

    So I try to save BBM with my email, but somehow he says someone use this username. So I try I forgot the password but it ask for a security question in which I don't know the answer. Help, please

  • GUI Builder Update... is there any

    Hello RIM announced it would be releasing a GUI generator for application development sometimes by the middle of 2010.  It is now 2011. Is there news on this? The project has been abandoned?  Is there a new release date?  Is there a plugin for Eclips