A question about the input within the PL/SQL block values

Hi all

I would be grateful if you could kindly help me with this issue well.

Consider the following code.
DECLARE
  myvar1 NUMBER;
  myvar2 NUMBER;
  myvar3 NUMBER;
BEGIN
  myvar1 := &1;
  myvar2 := &2;
  myvar3 := &3;
  
  DBMS_OUTPUT.put_line('myvar1 = ' || myvar1);
  DBMS_OUTPUT.put_line('myvar2 = ' || myvar2);
  DBMS_OUTPUT.put_line('myvar3 = ' || myvar3);
END;
/
This program reads the three input values and print them. However, I have noticed that if instead of writing
myvar1 := &1;
myvar2 := &2;
myvar3 := &3;
I am writing
myvar1 := '&1';
myvar2 := '&2';
myvar3 := '&3';
The program will have the same result. I would like to know if there is a semantic difference between the two syntax,
in other words, there is no difference between for example & myvar1 and "myvar1?


Thanks in advance,
Dariyoosh

& 1 would be a NUMBER
' & 1' would be a TANK, that would be implicitly converted to a NUMBER.

Tags: Database

Similar Questions

  • Basic questions about the PL/SQL web services and data source names

    Hello

    I've successfully generated a web service for a procedure from PL/SQL packaged JDeveloper 11.1.1.3.0).

    The following code was generated in the base class for web services:
     __dataSource = (javax.sql.DataSource) __initCtx.lookup("java:comp/env/jdbc/dbconnectionDS");
    However in the weblogic server, the data source name is jdbc/Gisele for deployment fails in a first time.

    What is the recommended procedure to solve this problem? The obvious solution is to manually change the source - that's what I did and it worked fine. However if I re - generate the web service I won't lose my change. Is there a better way to do it?

    Another question - in the web.xml file that is generated, there is a resource-ref to the data source. I was hoping that change the data source name it would help, but it didn't work. What is - it used to in this context?

    Thank you
    Luis

    I forgot to add, so in case some time later and you want to update the connection to your service details, all you have to do is to add the following entry in your weblogic.xml:
    .

    JDBC/ref_name_from_web. XML
    JDBC/new_jndi_name

    .
    And in this way, you will not have to change any code level to point your web service to another connection.

    Vishal-

  • Question about the transition from string values to the Partition clause in a merge statement

    Hi all

    I use the code to update the data of specific secondary partition using oracle merge statements below.

    I'm getting the name of the secondary partition and pass this string to the secondary partition clause.

    The Merge statement is a failure, indicating that the specified secondary partition does not exist. But the partition under do exists for the table.

    We use a server Oracle 11 GR 2.

    Here is the code I use to fill in the data.

    declare
    ln_min_batchkey PLS_INTEGER;
    ln_max_batchkey PLS_INTEGER;
    lv_partition_name VARCHAR2 (32767).
    lv_subpartition_name VARCHAR2 (32767).
    Start

    FOR m1 IN (SELECT (year_val + 1) AS year_val, year_val AS orig_year_val)
    FROM (SELECT DISTINCT
    To_char (batch_create_dt, 'YYYY') year_val
    OF stores_comm_mob_sub_temp
    ORDER BY 1)
    ORDER BY year_val)
    LOOP
    lv_partition_name: =.
    () scmsa_handset_mobility_data_build.fn_get_partition_name
    nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
    p_search_string = > m1.year_val);

    FOR m2
    IN (SELECT DISTINCT
    'M' || To_char (batch_create_dt, 'MM') AS month_val
    OF stores_comm_mob_sub_temp
    WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val)
    LOOP
    lv_subpartition_name: =.
    () scmsa_handset_mobility_data_build.fn_get_subpartition_name
    nom_table_p = > 'STORES_COMM_MOB_SUB_INFO ',.
    p_partition_name = > lv_partition_name,
    p_search_string = > m2.month_val);

    DBMS_OUTPUT. Put_line (' lv_subpartition_name = > ' | lv_subpartition_name |' and lv_partition_name = > ' | lv_partition_name);

    IF lv_subpartition_name IS NULL
    THEN
    DBMS_OUTPUT. Put_line ("to the INTERIOR of FI = > ' |") M2.month_val);
    INSERT INTO STORES_COMM_MOB_SUB_INFO (T1)
    T1.ntlogin,
    T1.first_name,
    T1.last_name,
    T1.job_title,
    T1.store_id,
    T1.batch_create_dt)
    SELECT t2.ntlogin,
    T2.first_name,
    T2.last_name,
    T2.job_title,
    T2.store_id,
    T2.batch_create_dt
    OF stores_comm_mob_sub_temp t2
    WHERE TO_CHAR (batch_create_dt, 'YYYY') = m1.orig_year_val
    AND'M '. To_char (batch_create_dt, 'MM') =
    M2.month_val;
    ELSIF lv_subpartition_name IS NOT NULL
    THEN
    DBMS_OUTPUT. Put_line (' INSIDE ELSIF = > ' | m2.month_val);
    MERGE (SELECT *)
    OF stores_comm_mob_sub_info
    SUBPARTITION (lv_subpartition_name)) T1
    USING (SELECT *)
    OF stores_comm_mob_sub_temp
    WHERE TO_CHAR (batch_create_dt, 'YYYY') =
    M1.orig_year_val
    AND'M '. To_char (batch_create_dt, 'MM') =
    M2.month_val) T2
    WE (T1.store_id = T2.store_id
    AND T1.ntlogin = T2.ntlogin)
    WHEN MATCHED
    THEN
    GAME UPDATE
    T1.postpaid_totalqty =
    (NVL (t1.postpaid_totalqty, 0))
    (+ NVL (t2.postpaid_totalqty, 0));
    T1.sales_transaction_dt =
    LARGEST)
    NVL (t1.sales_transaction_dt,
    T2.sales_transaction_dt),
    NVL (t2.sales_transaction_dt,
    T1.sales_transaction_dt)),
    T1.batch_create_dt =
    LARGEST)
    NVL (t1.batch_create_dt, t2.batch_create_dt),
    NVL (t2.batch_create_dt, t1.batch_create_dt))
    WHEN NOT MATCHED
    THEN
    INSERT (t1.ntlogin,
    T1.first_name,
    T1.last_name,
    T1.job_title,
    T1.store_id,
    T1.batch_create_dt)
    VALUES (t2.ntlogin,
    T2.first_name,
    T2.last_name,
    T2.job_title,
    T2.store_id,
    T2.batch_create_dt);
    END IF;
    END LOOP;
    END LOOP;

    COMMIT;

    end;
    /



    Really appreciate your input here.

    Thank you
    MK.

    Hello

    You can use "immediate execution" what works.

    Thank you

  • A question about the Oracle SQL Developer Oracle instance connection

    Hi all

    I would be grateful if you could kindly give me a helping hand.

    Recently, I installed the Oracle 11 g on Linux (ubuntu 8.10) database. I not create startup scripts. So here's how I start the server: (my linux user name is "dariyoosh", but in order to start the server I have connection on the terminal shell as user 'oracle')
    dariyoosh@alborz:~$ su oracle
    Password: 
    oracle@alborz:/home/dariyoosh$ cd
    oracle@alborz:~$ ORACLE_SID=database01
    oracle@alborz:~$ . oraenv
    ORACLE_SID = [database01] ? 
    The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle
    oracle@alborz:~$ sqlplus '/as sysdba'
    ...
    SQL> STARTUP NOMOUNT
    ORACLE instance started.
    ...
    SQL> ALTER DATABASE MOUNT;
    ...
    SQL> ALTER DATABASE OPEN;
    
    Database altered.
    Then I can work without any problems with my database and everything works pretty well. Today, I decided to install Oracle SQL Developer IDE as it makes it easier to modify the SQL code. My problem is that after reading the tutorial Oracle online, that I am still able to connect to my database. Firstly according to the method that I wrote, I have set up the Oracle instance. But then when I run Oracle SQL Developer I don't know what to choose for the user name and password? because since SQL * Plus shell as you can see I always write: "sqlplus 'virtue sysdba' and it does not prompt me for any password, I can access the database directly." Any idea? What password? What user name? for Oracle SQL Developer?

    Thanks in advance.

    When you connect "/ as sysdba", you actually connect as the user named SYS from the privileges of your operating system. SYS is the owner of the database and a privileged user. You really want to use this username for the day to day operations, but only for what can do only SYS. If you need a different user name. Several Oracle databases have a user named SCOTT who has a number of tables for use tutorial. By default, the password for SCOTT's "Tiger." You may also have other demo users, such as "HR". I admit that I forgot what is the password of the HR, but it doesn't really matter because SYS can change with this command:

    ALTER USER hr IDENTIFIED BY whateveryouwant;
    

    This command:

    SELECT USERNAME FROM ALL_USERS;
    

    lists all the users in your database. Understand that many of these users are there as owners of objects such as stored procedures and tables for Application Express, or TYPEs for Oracle Locator, not for general use. When you are ready to create your own objects, ask SYS create a username for them with

    CREATE USER myusername IDENTIFIED BY mypassword;
    

    and grant that user the privileges as necessary. You'll want to read before you get too far - I think that the developer of the Application Guide is a good starting point.

  • Questions about the management of specific nodes in different hierarchies

    Hi all

    I have a question about the specific management of some particular set nodes, which are located in different hierarchies within a same version.

    I want to know if there is any editing made to certain properties of these specific nodes or if the nodes are deleted/moved/edited approval to be triggered for the data manager.

    or should not allow users to edit (adding/moving/deleting/changing property values) or those specific members.


    According to my understanding of the nodes of domain prevents the removal of nodes, but I don't want my Member prefix/suffix, domain is the only way to prevent the change.




    Thanks and greetings

    Madhu

    We have an obligation to not allow a node to remove or deleted without the approval of the admin, so I created a Boolean property AllowDelete is false, which is substitutable, default and is available only in a category of property Admin, for which most of the users do not have access.  Then, I created a validation of PropRemove with an error message that tells the user to contact a user admin to remove or delete the node.  The admin can change the AllowDelete to true, then can either remove himself or to allow the user to do.

  • A question about the methods and parameters.

    Hey guys, this is my first post here. I am very new to Java and done a bit of C++ before Java. I had a question about the methods and parameters. I do not understand the methods; I know they can be repeated when it is called, but it's almost everything. I also know that a program should have a class that contains the main method. What I really, really understand on methods is what the parameters are. I know they are in parentheses and that is it. Could you explain what they are? I really appreciate it. Thanks to all in advance. Best regards, Michael

    Taking an example:
    Suppose you calculate area of the rectangle you need two inputs one is the length and the width. Area = l X b, where l = length, b = width

    If your method, say, calculateAreaOfRectangle (length int, int width) will be two parameters as arguments.

    System.out.println ("field of rectangle:" + calculateAreaOfRectangle (40,30);)

    public int calculateAreaOfRectangle (int length, int width) {}
    int area;
    Area = length * width;
    return of area;
    }

    So if you call this method then the output will be returned in 120.

    Parameters of a method are simply the input variables for the method of treatment for all calculations or something useful.

    And we cannot have methods inside the main method in Java. It is in the java syntax and if you do, it will throw a syntax error.

  • Question about the pen tool (w / photo inside)

    Hi all! I have a question about the pen tool. I think that this picture is very useful for my question:

    Demonstration.jpg

    So in this pic is an orange rectangle, and within this rectangle is a blue strip. I would like the blue band surface perfectly (not too much and not covered) the edge of the rectangle. For example, on the lower end of the blue band, you can clearly see that the band does not extend quite far to the edge of the orange rectangle. At the top of the band, he's a little more (a little hard to see). I work with some complex shapes when you use the pen tool and it's really slow me down to compensate for over/under Forms. If she could just snap to the borders of the other forms that would make my life a lot easier. Thanks for reading and please help!

    Duplicate the orange shape and change the fill color to blue. Draw your new shape on that layer, using the Intersect option.

  • Questions about the accordion component

    I have a few questions about the use of the accordion component:

    1. when my accordion is created it shows the first container child, this child is created at this time and if you go to another child it is also created (but only until it is first accesed). The thing in the first child, I need to access the properties and components located in other children, so it marks an exception to NULL, because I am trying to access the properties or the components that have not yet been created, but I really need to access and transmit values to other children containers at the moment (without their first navigation) , then it is possible to create all the children while creating the accordion although I would'nt need to navigate through its children to create them?

    2. is it possible to disable the functions of click of an accordion, so the only way to change bewteen her children is programmatically? I mean, you can click the buttons on the accordion to navigate through his children, but you can also do this programmatically by using the selectedIndex property, so I'll try to disable accordion buttons so the only way to navigate is programmatically.

    All the ideas of these two questions?

    You can use creationPolicy = "all" on the accordion and it will create all children, not only the first condition. The downside of this is that your application will have a little more time to start. Consider this:

    Child 2:

    If you try to set child2.input = 'something', a better solution would be to use data binding:

    Child 2:
    [Bindable] public var inputValue:String;

    Now you can do: child2.inputValue = 'something '; If the user interface of child2 have not been created, the inputValue parameter has without adverse consequences; as soon as the 2 child controls are created, data binding will assign the value. If child 2 has already been created, the data binding will also affect the value.

    You can disable the click event to the accordion by intercept and stop its spread, but you must do this in ActionScript, you can't do this in MXML.

    myAccordion.addEventListener ('change', accHandler, true); true means to use the capture phase

    private void accHandler (event:flash.events.Event): void
    {
    If (event.target is mx.containers.accordionClasses.AccordionHeader) {}
    Event.stopImmediatePropagation;
    }
    }

    The idea is that intercept you the click event, as it moves down through the components (capture phase). If the target of the event is an AccordionHeader, prevent you the event to go further - it is to reach the AccordionHeader itself.

    You can put this handler on accordion or its parent up to the Application.

  • A few questions about the difference between the Satellite P70, L70, S70

    Hello, I have a lot of questions about the P70, L70, S70 series that come with a 1920 x 1080 panel.

    (1) what are the differences between the L70 and S70 series? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    (2) P70, L70, S70 doesn't support a 2nd HARD drive or it's just the P70 series that support?

    (3) all the three (P70, L70, S70 series) come with the same TFT panels?

    (4) of the above series, which supports mSata?

    (5) all the model of each series are delivered with support from mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?

    (6) all the foregoing, are delivered with a S - ATA II or III S - ATA interface?

    (7) who is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.

    Thank you in advance.

    > (1) what are the differences between the series L70 and S70? With the exception of the RAM and HARD drive capacity, books seem pretty identical.

    What models Sat L70 and S70 do you mean exactly? There are different L70-xxx-xxx and S70 models on the market that supports different hardware specifications.

    (> S70 2) P70, L70, support a 2nd drive HARD or is - it just the series P70 that support?
    As you can see in this [Sam P70 HDD replacement document, | http://aps2.toshiba-tro.de/kb0/CRU3903II0000R01.htm] the P70 series supports the 2nd drive Bay HARD, BUT even if there is a 2nd HARD drive Bay, this does not mean that you can use the 2nd HARD drive. In the case where the 2nd HARD drive Bay are equipped with HARD drive connector, you can use the 2nd HARD drive

    I also found the [Sam L70/S70 HDD replacement | http://aps2.toshiba-tro.de/kb0/CRU3703HG0000R01.htm] the document on the Toshiba page and there I see this 2nd HARD drive Bay is not available

    (> 3) all three (P70, L70, S70 series) come with the same TFT panels?
    See point 1). Different P70, L70, S70 models were equipped with different material parts.

    (> 4) of the series above, which takes in charge mSata?
    As far as I know that some P70 models are equipped with an mSATA SSD of 256 GB.

    (> 5) do all the model of each series are delivered with support mSata? For example, it could be that L70 - a - 13 m supports mSata is not the case of the L70-a-146?
    See point 4) not all models supports the same hardware specifications

    (> 6) all of the above, come with a S - ATA II or III S - ATA interface?
    I don t think that SATA III is supported. I guess it would be SATA II

    (> 7) which is the best of these series listed? I'm trying to understand what makes the big difference of S70 to P70 except for the envelope for example.
    Not easy to answer because there are too many models released in Europea.
    And not all models are available in each country. So I guess you will have to look for the models that have been released in your country.

  • A few questions about the upgrade on Satellite A300-144

    Sorry for the typos, English is not my mother tongue.
    I want to ask some questions about the upgrade of a300-144.

    * Some info first.*

    CPU: T2370 ([http://ark.intel.com/products/34445/Intel-Pentium-Processor-T2370-1M-Cache-1_73-GHz-533-MHz-FSB]).
    Chipset: GM965 ([http://ark.intel.com/products/29821/Intel-82GM965-Graphics-and-Memory-Controller]).

    * Questions.*

    1. my frequency of laptop memory at 533 MHz, supports 667 MHz memory controller, memory modules can work at 667 MHz. Is - this because CPU FSB 533 MHz frequency and new processor at 667/800 MHz FSB will fix it or it is hardcoded in the BIOS?

    2 Intel said that the size of max memory for my chipset is 4 GB (2 x 2 GB), but Toshiba says that only 2 GB (2 x 1 GB), who is right?

    3 I know, taken of my CPU is μFCPGA-478 aka socket P, max FSB 800 MHz, max 35 W TDP, so T9500 ([http://ark.intel.com/products/33918/Intel-Core2-Duo-Processor-T9500-6M-Cache-2_60-GHz-800-MHz-FSB]) is a compatible processor or there are some limitations in the BIOS?

    > 1. My frequency of laptop memory at 533 MHz, supports 667 MHz memory controller, memory modules can work at 667 MHz. Is - this because CPU FSB 533 MHz frequency and new processor at 667/800 MHz FSB will fix it or it is hardcoded in the BIOS?

    The speed of the memory is related on the material. This means that the FSB is responsible for the limitation.
    If the FSB would allow support 667 MHz then the memory would also at this speed.

    > 2. Intel says that the size of max memory for my chipset is 4 GB (2 x 2 GB), but Toshiba says that only 2 GB (2 x 1 GB), who is right?
    The memory depends on the chipset. So if the chipset supports 4 GB of RAM, you should be capable of this move to 4 GB of RAM

    > 3. I know, my CPU is? FC-PGA-478 aka socket P, max FSB 800 MHz, max 35 W TDP, so T9500 (http://ark.intel.com/products/33918/Intel-Core2-Duo-Processor-T9500-6M-Cache-2_60-GHz-800-MHz-FSB) will be a compatible processor or there are some limitations in the BIOS?

    It might be possible that the new processor would be fully supported by the BIOS, but in most cases it should not be a problem if the chipset would support the new processor.
    But as far as I know the upgrade of the CPU is not supported by Toshiba or any other manufacturers of portable and its your own risk to run laptop with the new processor.

  • Question about the recovery partition

    Hello.

    I have a question about the recovery of HARD drive partition.

    If I do the operation to clear the hard disk option in the wizard it will remove * all * or it will keep my partition recovery in this way I can come back later. I want to know because I would like to put on a different OS.

    I know he said he would, but caution in the PDF, I found it says that on a normal recovery too (that he would remove each partition) and I'm a little confused about how the recovery actually worked.

    Thank you.

    Hey Buddy,

    To be honest I n don't know what you mean exactly with this option to erase.

    In General, Toshiba Recovery disk will wipe your entire HDD to restore factory settings correctly. This means that if you start from that disk and follow the instructions on the screen, everything will be removed.

    In addition, the recovery disk doesn t create a recovery partition. It is not available. Disk copy just the files on the second partition in folder HDDrecovery to start an installation of HARD drive recovery.

  • A few questions about the Satellite A100 PSAANE

    Hi friends,

    I have a Toshiba Satellite A 100 - PSAANE with Vista Home Basic preinstalled in it.
    Now, I have a few questions... I mention below: -.

    (1) if I want to format my laptop, I need a CD to install for Vista Home basic... then I don't have this Toshiba CD when I bought the laptop. So how do? question: How can I format it?

    (2) can I change my Vista Home Basic to windows XP? I think it's much faster than this one. is it advisable?

    (3) I have a GB of RAM in the laptop. Increase the RAM? I think that my laptop has become to slow down. is it advisable?

    (4) and on my screen, everytime I try to change my profile screen to windows Classic view, my screen begins to blink. and after a while, the screen turns off. So I can't change that. I put the color scheme of windows vista only. What to do about that?

    Please help me friends. Thanks in advance.

    Kind regards
    Perkins

    Hello

    Here, a few questions about the number:

    (1) usually, you should get the Vista Toshiba Recovery DVD. If you didn t receive this DVD then you can order it here https://backupmedia.toshiba.eu/landing.aspx or you could install the disc of Microsoft Vista.

    (2) of course, you can do this. I think that Win XP drivers can be downloaded from the Toshiba driver page.

    (3) Yes, you can upgrade the RAM. For more information, see your manual or search on this forum for similar topics

    (4) maybe it s associated with the graphics driver. Check if you can update. I would recommend additional check if you are using the latest version of the BIOS

    Welcome them

  • Re: Several questions about the recovery of the Satellite L750 features

    I have several questions about the recovery of Satellite L750 features available to it. Any help and answers would be useful.

    (1) when I started the laptop first, he asked me to create a recovery CD incase I need to reinstall the operating system. But he also said that he built in the recovery partition, so therefore, I have to make a recovery cd or not?

    (2) will be the recovery CD is exactly the same as the recovery on the system partition?

    (3) is the partion of CD or recovery includes all the integrated software pre-installed with the laptop?

    (4) also in the device manage management it shows watch partion recovery but it is empty, is it true?

    (5) in the second partition (drive D) system, he has a record with what looks like the recovery of files and folders. Is it safe to move/remove it?

    Hello

    I'll try to provide answers:
    1 - to ensure that everything works perfectly you don t need these discs, but if something goes wrong with the HARD drive you will not be able to do anything. When you have the recovery DVDs, you will still be able to install the recovery image and once again the factory settings. So my advice to you is: create these discs as soon as possible. Use only on DVD-R media and buy products of high quality (TDK or Verbatim).
    2 - Yes.
    3 - Yes.
    4 - No. Don t be confused with this.
    5. in a first time create restore DVD, and later you can do what you want. I put t know which files mean you but don t touch anything before that of the recovery disks to be created.

    In the past, many people have been experimenting with the structure of HARD drive and partitions and later was surprised when installing disk recovery HARD has been damaged. Don t make the same mistake.

    If you have any other questions you are welcome.

  • Question about the new Yoga 10 HD +.

    Hello

    A few questions about the new Yoga 10 HD + that I hope you can answer.

    I bought the former model, last year. Love the design and long battery life, but a few major questions made me return.

    • Somewhere that I've read that it can not read NTFS on USB so I guess that's the same thing with a NTFS formatted microSD card?
    • Can it read exFAT formatted microSD cards?
    • Anyone who has questions about the audio via bluetooth?
      (I know that BT is not exactly High End HiFi but the old 10 Yoga for some obscure reason - most likely a driver problem which nobody cared to fix - rang * very * worst with visibly distortion while both my phone and a Tablet noname cheap I have zero about fidelity - any of my devices bluetooth audio) I tried aptX or not)

    So to avoid buying it back it also I really I would like to see if I can get my questions answered before buy you.

    While I love the form factor and long term issues above are only two Mayor dealbreakers for me. Bad audio quality = no joy listen to spotify, local etc. MP3s. not of NTFS or exFAT = some great movies.

    My old noname android Tablet really could use an upgrade so I'm really curious it may be, or I should watch the competition and will be form factor and battery LIFE.

    Thanks in advance.

    EDIT:

    If it does not support NTFS or exFAT on microSD card have someone at - he tried ext3 or ext4?

    I mean with Linux Android root, it should be a no-brainer to support at least when it comes to royalties unlike NTFS or exFAT where it * might * have some trouble with Microsoft.

    I used a USB through a USB OTG cable. NTFS or exFAT have been recognized by the Tablet PC. FAT32 is seems to be the preference.

  • I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I go back in just the Quicken file and restore it until I downloaded the update do I have to restore the entire

    I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I come back in all the Quicken file and restore from time Machine before I downloaded the update to do, I need to restore the entire computer?

    Yes, you can just restore this file or application. Use Time Machine to back up or restore your Mac - Apple Support

Maybe you are looking for