:VARIABLE_NAME and v('VARIABLE_NAME') have different values

A basic question ...
I have the following ... (including some debug stuff) ...
IF (:P3_PE_REQ_STATE = 'NEW') THEN
:P3_PE_REQ_STATE := 'DRAFT';
insert into debug_table values(null,v('P3_PE_REQ_STATE'));
insert into debug_table values(null,:P3_PE_REQ_STATE);
commit;
END IF;
The DEBUG_TABLE shows two different values ... with v('P3_PE_REQ_STATE') = 'NEW' and :P3_PE_REQ_STATE = 'DRAFT'
Why would these be different?

In ajc's block, v('P3_PE_REQ_STATE') obtains the value from the PL/SQL package state copy of session state in the database session. This is the pre-updated value. The assignment statement with :P3_PE_REQ_STATE on the left-hand side changes the value of the bind variable, which may be subsequently altered/referenced as a bind variable to the extent the name remains in scope for the duration of the dynamic execution of the block. At the end of the block, the final value of any bind variables corresponding to page or application items and whose pre- and post-execution values are different are written to the session state tables and committed (using the same code invoked by HTMLDB_UTIL.SET_SESSION_STATE). At that point the package-state copy of session state is also updated so that subsequent references using the v function will get the updated value.
Scott

Similar Messages

  • Ok, im new to numbers but i cant work this one out. In column A is an average of hours worked. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column a

    Ok, im new to numbers but i cant work this one out. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column A. When column C is equal or greater then 8 i need column D to equal the sum of A and B.

    Hi Lucas,
    Try this:
    Formula in D2 (and Fill Down) =IF(C2<8, A2,A2+B2)
    The IF function follows the logic of if, then, else.
    IF(this is true, then do this, else do that)
    If it is raining, then stay at home, else hold a picnic .
    Regards,
    Ian.

  • How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. Do I use .png or svg?

    I want to use Edge Animate to create native app in PhoneGap Build. How do I know if my Edge Animate compositions will scale up or down to fit each mobile phone platform's resolution? iPhone 3s, 4, 4s, 5, and 5s all have different resolutions. And do I use .png or svg?

    If you use responsive scaling it will definitely scale .
    For best practises regarding graphics refer
    Edge Animate Help | Best practices for graphics in Adobe Edge Animate

  • I and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.

    i and my brother have different apple id's but are using the single itunes library on our home PC.When i am syncing my iphone most of the times the apps that were purchased with my brothers apple id is also getting on my iphone.
    How do i differentiate the apps that were purchased with my apple id and sync accordingly.As i want only the apps that were purchased in my apple id.
    I am aware of the fact that i can click on the app and check with "getinfo" to see with whose apple id it is brought.but there are hundreds app which i cannot check one by one.
    How do i filter the apps with apple id and sync?

    Connect the device to the computer.
    Open iTunes.
    Select the content desired to sync.
    Sync.

  • Can i use home sharing if me and my wife have different apple ID accounts?

    can i use home sharing if me and my wife have different apple ID accounts?

    Yes.
    You need to sign into home sharing using ONE Apple ID. So either pick yours or hers, use the same one for home sharing on the computers. Once they are signed in on both Macs you can access media that the other user purchased.
    Click the 'Shared House' for her library (if you have the sidebar enabled) when you are in your iTunes to access her media & vice versa, both iTunes needs to be running & awake.

  • I have an iPhone 4S and an iPad2, can i use both chargers in the iPhone and iPad, they have different amperage...

    I have an iPhone 4S and an iPad2, can i use both chargers in the iPhone and iPad, they have different amperage...

    You can use your iPad charger to charge your iPhone 4S. Not recommended to use your iPhone charger to charge your iPad. So, use your iPad charger to charge both.

  • How do I select a playlist to copy onto my devices?  On the older version, I could click on each list, then check "sync only checked playlists" and I'd have different playlists on different devices.  How do I do it with this version?  Thank you!

    How in 12.1.0.50 can I select a playlist to copy onto my devices from my iMac?  On the older version, I could click on each list, then check "sync only checked playlists" and I'd have different playlists on different devices (iPhone 6, iPod nano).  How do I do it with this version?  Thank you!

    Same way.
    Select the device, click Music tab and select the playlists to sync.

  • Vendor 800040 and posting data have different withholding tax types

    HI
    need some help..
    i ve created the lease in contract but unable to activate it... getting the following error
    Vendor 800040 and posting data have different withholding tax types...
    how to solve this issue,,

    Hi,
    could you please add the error message ID and error message number.
    Thank you.
    Regards, Franz

  • Me and my collegue have different versions of InDesign CC even though it is in the cloud - shouldn´t we automatically have the same?

    Me and my collegue have different versions of InDesign CC even though it is in the cloud - shouldn´t we automatically have the same?

    Without exact system info and version info nobody can tell you anything. From failed updates to simple compatibility issues and one of the machines not meeting the requirements for a newer version this could be anything.
    Mylenium

  • I cannot send emails; looks like my smpt parameters are wrong; what difference is there between my incoming and outgoing servers and should they have different parameters (ID and password)?

    I cannot send emails; looks like my smpt parameters are wrong?? What difference between the incoming and out coming servers? Do I have different user names and passwords?
    I would appreciate some assistance
    Thanks

    I cannot send emails; looks like my smpt parameters are wrong?? What difference between the incoming and out coming servers? Do I have different user names and passwords?
    I would appreciate some assistance
    Thanks

  • HT1918 My iPhone and my iPod have different account email addresses, I would like to sync them.  When I try to change (using edit) it reminds me that I already have an account with that name.  I don't need the reminder, I need to change the email address

    I used different email addresses when I signed up for my iPod and my iPhone.  I would like to use only ONE email address for both devices.  When I try to edit, it tells me there is already a user with that address (hint:  I know that!).  Does anyone know how to sync two email accounts into one?  Thanks,

    When I go into my account settings and try to change my old hotmail address to my current Yahoo! address, it tells me "That email address is already used as an Apple ID."  Yeah, I know that.  I set up the account that I'd really, really, like to have together, but it won't let me go further.  End of activity!  It is trusting that my email account and password are correct b/c it will let me make purchases, etc., so it's not like it is preventing fraud or anything.   Summary:  iPod = Yahoo!, iPhone = hotmail, would like to have both reflect my Yahoo! address. 

  • E66-3 and E66-2 have different firmware?

    I have an E66-3 RM-420 (for those who does not know the R stands for ‘Computing Device’ and the M stands for ‘EGSM 900/1800 and WCDMA’). There are three E66:
    E66-1 HSDPA 2100 / 900 (Europa) RM-343
    E66-2 HSDPA 850 / 1900 (North America) RM-345
    E66-3 HSDPA 850 / 2100 (Australia) RM-420
    All off then ‘RM’, i.e., all support EGSM 900/1800 and WCDMA, but the HSDPA has different frequencies, so the hardware must be different, even if just a bit.But the firmware may be the same at all, because the internals functions name may call the very same functionality from the hardware (same name, but different functionality, so Nokia could manage to have one firmware only).Am I right?
    Message Edited by dazz19 on 05-Apr-2009 07:08 PM

    yes they would be different to support the network and area they are intended for
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • Variable have different values

    I have a public var called enemyNumber in my Enemy class.
    And in my document class, I added an instance of the Enemy class, and I want to give enemyNumber a number. Let's say 1.
    Enemy:
    //ENEMY HOLDER
                        public var addMonster:MovieClip = new MovieClip();
      public var enemyNumber:int;
    //LIST OF ENEMIES
                        private var croak:Croak = new Croak();
      private var worm:Worm = new Worm();
    if (enemyNumber == 1) { addMonster = croak; }
    if (enemyNumber == 2) { addMonster = worm; }
    addChild(monster);
    Main:
    public var enemy:Enemy = new Enemy;
    addChild(enemy);
    enemy.enemyNumber = 1;
    Basically I added movie clips of enemies that will equal addMonster depending on the number. I want to declare the number in the main document class because I added an instance of the Enemy class in my main. Problem is, when I try this out, nothing is added. The enemyNumber is 0 when I trace it in Enemy class, but 1 when I trace it in Document class. Is there anyway to relay the value of what I have for enemyNumber in my Document class to the Enemy class?

    When you first create the instance is the only time those two if statements will execute, if at all.  At that point in time it will not have been assigned a value.
    You will need something in the main file that causes execution of the conditional(s).  You could place them inside a function in the Enemy class and then have the main file call upon that function as needed.

  • My iphone and my Mac have different accounts. How can I change my iphone account to my Mac account and keep everything together on one account?

    I have the new Mac Book Air and The Iphone 4s. I also do not want to completely get rid of my account on my iphone.
    Any answers are appreciated! Thanks

    You would have to change it back to your old email address in order to turn off "Find My iPhone" on your devices. After you changed it back to your old address and deactivated "Find My iPhone" (activation lock) you could change your Apple ID to your new address again. Now it should wok on all your devices.

  • SSIS 2005 and SSIS 2012 Have Different Data Flow Output

    Hi Guys,
    I'm currently converting our SSIS 2005 packages to 2012 and I'm finding an odd difference on the Data Flow Output when it imports a txt file to a table.
    We have a pipe delimited file ( contains a totals on the bottom row).
    CATNO|Title|Total Stk Avail|Stk on Order|Rank|QOH|Allocated|Reserved|BackOrd|WIP|Cleared|Held
    CATNUM000067|Fast and Furious|9804|0||9804|0|0|0|0|0|0
    CATNUM000068|Frozen|0|0||0|0|0|0|0|0|0
    CATNUM000029|Brave|0|0||0|0|0|0|0|0|0
    CATNUM000029|Brave with Kinect|0|0||0|0|0|0|0|0|0
    CATNUM000029|Big Hero|0|0||0|0|0|0|0|0|0
    CATNUM000057|Transformers|27376|0||27376|0|0|0|0|0|0
    CATNUM000013|James Bond|121|0||121|0|0|0|0|0|0
    ,Total Available Stock,524259
    And these are the settings for the flat file connection
    In SSIS 2005, the total rows are being omitted automatically by the data flow. Basically only 7 rows are inserted whereas in SSIS 2012. 8 rows were inserted including the totals.
    if we think about it, SSIS 2012 is correct since we just feed what's ever in the file.
    But on the conversion and testing perspective, it's now harder as there's discrepancies between those 2 version.
    I just like to check if there's any other discrepancies in terms on results/output between SSIS 2005 and SSIS 2012
    Many thanks. 

    Hi Vinxster,
    After testing the issue that Flat File Connection Manager cannot handle file with total row in my SQL Server 2005 environment, I can reproduce it.
    Based on my research, the issue is caused by the Column Delimiter gets first preference and then Row delimiter. This is by design in SQL Server 2005, SQL Server 2008 or SQL Server 2008 R2.
    Good news is that the issue is fixed in SQL Server Data Tools which comes with SQL Server 2012. In SQL Server 2012, by default, the Flat File Connection Manager always checks for a row delimiter in unquoted data, and starts a new row when a row delimiter
    is found. This enables the connection manager to correctly parse files with rows that are missing column fields.
    If you want to fix the issue in SQL Server 2005, there is a sample component posted to the CodePlex that might help you with this:
    http://ssisdfs.codeplex.com/
    References:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2013/03/13/flat-file-source-cannot-handle-file-with-uneven-number-of-columns-in-each-row.aspx
    https://connect.microsoft.com/SQLServer/feedback/details/293193/ssis-import-of-flat-file-with-uneven-number-of-columns
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for