What is the Difference Between these IF statements

Hello
Can someone tell me the difference between these two IF statements.
-- IF STATEMENT 1--
IF v_transcode not in ('A','C','D') THEN
raise_application_error (-20000, 'Error Invalid Transcation Code');
END IF;
-- IF STATEMENT 2 --
IF v_transcode <> 'A' AND v_transcode <> 'C' AND v_transcode <> 'D' THEN          
raise_application_error (-20000, 'Error Invalid Transcation Code');
END IF;
Thanks

Your if condition wherein you do
v_transcode <> 'A' and v_transcode <> 'C' and v_transcode <> 'D'.
I would think this is more better in terms of performance, because if the first clause (v_transcode <> 'A') fails nothing else needs to be evaluated, and it can skip the if condition there itself,
but in case of
v_transcode not in ('A', 'C','D'),
it has to scan through the entire list.
On the other side, if you have just 2 or 3 values to compare this makes sense, otherwise we may have to use the in operator.
--Bhargavi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • What is the difference between these two reports MC.1 and MB5L

    Hi
    what is the difference between these two reports MC.1 and MB5L?
    what is the Purpose of each report?
    Material ledger is activated for this plant, we found some amount difference between these two reports, my client accounting department used to compare these two reports while year end/month end closing
    Thanks
    Raju

    MC.1 will give you the report for plant analysis as per plant .
    MB5L report will give you list of stock value as per G/L account wise.

  • What's the difference between "PreparedStatement" and "Statement"?

    What's the difference between "PreparedStatement" and "Statement"?
    Which is better??????

    Read the docs for the two classes. The differences are apparent there.
    Which one is better depends on your needs. I think that constructing and executing a PreparedStatement can be a bit less performant than just a Statement, if you're only executing the query one time. But I don't think that difference will normally be noticable in the context of a given application.
    Additionally, if you have to pass any dates or strings to the query, you'll want PreparedStatement's parameters, rather than trying to format and escape things in the query string.

  • What is the difference between these setter methods

    What is the difference between these two setter methods??
    <jsp:useBean id="checking" scope="session" class="bank.Checking" />
    <jsp:setProperty name="checking" property="balance" value="0.0" /> and
    <jsp:useBean id="checking" scope="session" class="bank.Checking" >
    <jsp:setProperty name="checking" property="balance" value="0.0" />
    </jsp:useBean>

    Homework question?
    The answer is on this page (Step 5)
    http://java.sun.com/products/jsp/syntax/1.2/syntaxref1217.html#8865

  • What is the difference between these two sticks of RAM?

    I am upgrading my Macbook 2.2 GHz Intel Core 2 duo from 2GB of ram to 4GB
    What is the difference between these two kits?
    4GB Kit (2 x 2GB) 200 Pin DDR2-667 PC2-5300 256x64 CL5 1.8V SODIMM ($102.00)
    4GB Kit (2 x 2GB) eRam 200 Pin DDR2-667 PC2-5300 CL5 1.8V SODIMM ($88.00)

    Probably nothing of any consequence. Some places can just negotiate better deals with suppliers. Or one of a million other factors that can affect price is in play here.
    When buying RAM, I generally find it's better to pay a little extra to get a brand that's known for quality. I usually stick to Crucial myself. If you look around, you can probably find some real steals out there, but I don't know... With stories of people who literally go dumpster diving, salvaging stuff that was slated for disposal, then turning around and selling it... I prefer not to take chances. If you are, by all means, go for the cheaper one.

  • What is the difference between these two portalapps folders on the Server?

    Hello,
    On the Server there are two portalapps folder:
    1. Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\portalapps
    2. Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps
    Can someone please explain me what is the difference between these two portalapps folders and under which case will I turn to which folder?

    Hi Roy,
    The one at this location
    Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\portalapps
    has all the files from the WEB-INF folder i.e. these are the non-web resources and cannot be accessed via HTTP(S) examples would be imgaes, CSS etc that you want only your application to access
    those under
    Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps
    they have all the .JAR files, portalapp.xml, config properties etc. these are web resources and can be accessed via HTTP(S)
    Hope this is of help.
    Akhilesh

  • What is the difference between these two commands?

    What is the difference between these two commands?
    DROP TABLESPACE users INCLUDING CONTENTS;
    DROP TABLESPACE users INCLUDING CONTENTS AND DATAFILES;
    --------No.202

    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9004.htm#i2133717

  • What are the differences between this two statements???

    1.select * from counter where eboxid = (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
    2.select b.* from zsyy_ocecs.CM_SUBS_SUBSCRIBER a,COUNTER b where a.acctid = b.eboxid and a.servnumber = ?;
    what are the differences between the 2 sql statements??
    I WILL APPRECIATE FOR YOUR ANSWERS VERY MUCH, BECAUSE I WAS PUZZLED WHEN I SAW THE EXECUTION PLANS.THANKS AGAIN. MR SHI.
    the followings are their execute plans:
    Command> select * from counter where eboxid = (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
    Query Optimizer Plan:
    STEP: 1
    LEVEL: 2
    OPERATION: TblLkTtreeScan
    TBLNAME: ZSYY_OCECS.CM_SUBS_SUBSCRIBER
    IXNAME: IDX_SERVNUM
    INDEXED CONDITION: CM_SUBS_SUBSCRIBER.SERVNUMBER = qmark_1
    NOT INDEXED: ROWNUM < 3
    STEP: 2
    LEVEL: 2
    OPERATION: RowLkTtreeScan
    TBLNAME: COUNTER
    IXNAME: IDX_COUNTER
    INDEXED CONDITION:
    COUNTER.EBOXID = CM_SUBS_SUBSCRIBER.ACCTID
    NOT INDEXED: <NULL>
    STEP: 3
    LEVEL: 1
    OPERATION: NestedLoop
    TBLNAME: <NULL>
    IXNAME: <NULL>
    INDEXED CONDITION: <NULL>
    NOT INDEXED: <NULL>
    Command> select b.* from zsyy_ocecs.CM_SUBS_SUBSCRIBER a,COUNTER b where a.acctid = b.eboxid and a.servnumber = ?;
    Query Optimizer Plan:
    STEP: 1
    LEVEL: 2
    OPERATION: TmpTtreeScan
    TBLNAME: ZSYY_OCECS.CM_SUBS_SUBSCRIBER
    IXNAME: <NULL>
    INDEXED CONDITION: <NULL>
    NOT INDEXED: A.SERVNUMBER = qmark_1
    STEP: 2
    LEVEL: 2
    OPERATION: TblLkTtreeScan
    TBLNAME: COUNTER
    IXNAME: IDX_COUNTER
    INDEXED CONDITION: B.EBOXID
    = A.ACCTIDNOT INDEXED: <NULL>
    STEP: 3
    LEVEL: 1
    OPERATION: MergeJoin
    TBLNAME: <NULL>
    IXNAME: <NULL>
    INDEXED CONDITION: A.ACCTID = B.EBOXID
    NOT INDEXED: <NULL>
    Edited by: user9533799 on 2008-9-3 上午1:28

    If zsyy_ocecs.cm_subs_subscriber table returns one row for each servnumber, both statements would return the same data. But if there was a servnumber value on two rows, the first statement will throw an error (you a comparing a value with a set of values). You can rewrite the first query to avoid this:
    select * from counter where eboxid in (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
    Conceptually they are different and the execution plan can't be the same.

  • What is the difference between these two charging cycles??

    Hi,
    When u check out this http://www.apple.com/batteries/
    it says something about 2 hours Fast Charge and 4 hour Trickle Charge!!
    what is the difference between both of them?
    i charged my iPhone that day for 4 hours but i didn't notice any difference and it says Full after 2 hours!!
    does it matter if it is charged through the computer or a power outlet on the wall??
    Thank you

    agent_s87 wrote:
    When u check out this http://www.apple.com/batteries/
    it says something about 2 hours Fast Charge and 4 hour Trickle Charge!!
    what is the difference between both of them?
    In total it takes 4 hours to recharge the battery. You won't really know the difference actually if you plug it in when you go to bed for 7 hours. It actually states 2 hours to fast charge and 2 hours trickle charge. If you look closely at the chart it's based on 4 hours in total.
    i charged my iPhone that day for 4 hours but i didn't notice any difference and it says Full after 2 hours!!
    does it matter if it is charged through the computer or a power outlet on the wall??
    No it doesn't matter each one. You can buy any number of wall chargers and power packs at your local store. Go to Bestbuy.com and type 'iPhone Power' for select power plugin iphones.
    - Griffin - PowerBlock Charger for Apple® iPod® and iPhone
    - Griffin - PowerBlock Universal Dual AC Charger
    - DLO - Power Pack Home and Auto Chargers for Apple® iPod® and iPhone
    - DLO - Power Bug for Apple® iPhone
    - Apple® - USB Power Adapter for Apple® iPod® and iPhone
    - Belkin - Power Central with Cable Catch for Apple® iPod® and iPhone - White
    - Incase - Power Slider Case for Apple® iPhone 3G - Black
    With the last one "Incase - Power Slider Case for Apple® iPhone 3G - Black" gives you a whole day worth of a charge on standby without having to put the phone on Airplane Mode to conserve power. I kept it on in my pocket for 12 hours and the iPhone was still active.
    Message was edited by: JoeZinVA

  • What is the difference between these two partitioning related commands?

    What is the difference between the following commands used to drop a partitioned table ?
    DROP TABLE...
    DROP TABLE...PERGE

    Oracle Database processes a DROP TABLE statement for a partitioned table in the same
    way that it processes the statement for a non-partitioned table. One exception that was
    introduced in Oracle Database 10g Release 2 is when you use the PURGE keyword.
    To avoid running into resource constraints, the DROP TABLE...PURGE statement for a
    partitioned table drops the table in multiple transactions, where each transaction drops
    a subset of the partitions or subpartitions and then commits. The table becomes
    completely dropped at the conclusion of the final transaction
    First, if the DROP TABLE...PURGE statement fails, you can take corrective action, if any,
    and then reissue the statement. The statement resumes at the point where it failed.
    Second, while the DROP TABLE...PURGE statement is in progress, the table is marked as
    unusable by setting the STATUS column to the value UNUSABLE in the following data
    dictionary views:
    ■ USER_TABLES, ALL_TABLES, DBA_TABLES
    ■ USER_PART_TABLES, ALL_PART_TABLES, DBA_PART_TABLES
    ■ USER_OBJECT_TABLES, ALL_OBJECT_TABLES, DBA_OBJECT_TABLES

  • What is the difference between these two cards

    What is the difference between the?X-Fi Fatalty and the X-Fi XtremeGamer Fatalty Professional Series. I want to replace my X-Fi Platinum with one of these cards.

    does any know the difference?

  • What's the difference between these two backup systems?

    When I bought my Macbook Pro I bought a Seagate external HD that used Bounceback Express as its backup application. But now my Mac defaults to Time Machine. What's the difference between the two applications? When I use Time Machine to back up my hard drive to the Seagate external, is it doing the same thing as Bounceback Express used to?

    In analog terms, to explain YCbCr use the example of the COMPONENT output from your DVD player. It use 3 separate cables (Y = Luminance = Green Cable), (Y-B = Blue Color Diff = BLUE Cable) and (Y-R = Red Color Diff = RED Cable). In the analog world, RGB is actually RGBHV (5-wire) and is adaptable to 15-pin VGA with a simple passive adapter. Many people will mistakenly refer to Analog Component video as RGB, since the cables are Red, Green and Blue.
    So, since all that mumbo jumbo means essentially the same, this appears to be the digital "equivalent" of what is known as Component Video in the Analog world... What I said about RGBHV does not apply to the 10-bit color, but thought I'd mention it anyway.
    -BChil

  • What are the difference between these Extractors?

    What are the difference between ReflectionExtractor, ValueExtractor and KeyExtractor?
    Thank you

    Why not use ValueExtrctor in this example?
    cache.addIndex(new ReflectionExtractor("getAge"), true, null);
    cache.addIndex(new ChainedExtractor(reflectAddrHome,
    new ReflectionExtractor("getState")), true, null);Does the folllowing script OK?
    cache.addIndex(new ValueExtractor("getAge"), true, null);
    cache.addIndex(new ChainedExtractor(reflectAddrHome,
    new ValueExtractor("getState")), true, null);Thank you

  • What is the difference between these tow?

    Hi,
    Inside a JFrame's code both
    getContentPane.add (...)and
    add (...)both are working.
    How come they are working identically? What is the difference between them?

    Darryl.Burke wrote:
    And learn to read the API.
    As a conveniance add and its variants, remove and setLayout have been overridden to forward to the contentPane as necessary.
    dbProbably first learn where to find it, here:
    http://java.sun.com/javase/6/docs/api/

  • What is the difference between these two matrices

    Hi,
    I was given some code from Altenbach to fix a problem I was having, his example works perfectly but when I connect it to my matrix it gets errors, so my question is what is the difference between the random matrix he made and the matrix coming out of the eigenvector node of the eigeinvector eigenvalue vi.?
    Thanks in advance for your help.
    Attachments:
    SortColumnsBySum.vi ‏14 KB

    Thank you,
    I should have seen that this was wat it was outputting. Please excuse my ignorance beacuse I am fairly new at this, so I can see that the sort complex sorts the colum in ascending order vertically what I need to do is rearrange the order of the matrix horizontally column by column with the sum of the column being the order. E.g if the sum along the column verically is the largest then that column is made column 1 etc. Is it possible to do this with either of the functions you mentioned? I think that I will need to keep the values neagative and posative so that I can take the largest value column, is this correct?

Maybe you are looking for

  • How to solve a complicated Equation in Numbers?

    I have to calculate the solutions of a complicated equation in Numbers. I have tried to find functions that finds the zeros of a expression, or thought of setting up while loops that runs until the error term is almost 0, but I cannot find any such t

  • No content shows up in iTunes after updating - Apple's fix doesn't work!

    Hello, I have a iPod Classic 80gb and Itunes(last version). I don't know what the heck happens, but my library is cleared everytime Itunes is updated. Every time this happens I try replacing the Itunes library (date).itl file back into the Itunes fol

  • Iphone 4 will not turn on no matter what!

    This happened friday. I was playing a game. Locked my phone 5 min later went to check it and it wouldnt turn on!!! I did the lock/home key for 3 min. I charged it all night last night. I had it connected to the computer thinking itunes would somehow

  • 2 GB microSD card for N3250

    has nokia or other flash storage companies released this much awaited 2 gigabyte version of the microSD card? can the 3250 possibly use this larger capacity card if it becomes available ? just a question guys The world might be a better place if you

  • Back in the Box!!

    Well I sure wish I read these forums before I committed my myself. After un-packing, and initial installation, things seemed ok, it took about 3 hours to get internet through the thing (to be honest i still don't know what i did to get it working, an