Difference between Return(0); and Return 0; ???

Hi,
I wonder if there any difference between a return with parenthesis and no...
Return (0);
Return 0;
I have those to in a function and I wonder why
Thanks
Pete

No difference.

Similar Messages

  • Difference between Return Po and Retuning with 122 movement type

    Dear Experts,
    i need some clarification on Return Po and retuning goods with 122 movement type in the context of Excise invoice.
    in our previous company we used 122 movement we capture excise invoice with J1IS and referring the incoming excise
    and return the material to vendor.
    in present company we are directly doing return Po and capturing excise invoice with J1is,here we are not capturing against the
    incoming excise,please clarify me.
    Regards,
    Varun

    Hi,
    Refer the below thread:
    Difference between 102, 122 and 161
    In terms of stock movement, both 122 and 161 represents the return delivery to your vendor. The difference takes place in terms of how you are returning your delivery to your vendor - It is movement type 161 that SAP will automatically propose if your return PO is referenced. Otherwise, 122 movement type will be used instead.
    Regards,
    Prashant
    Edited by: Prashant Prasad on Apr 22, 2011 8:51 AM

  • Difference between confirmation cancellation and return delivery

    Dear Gurus,
    can you explain to me the difference between confirmation cancellation and return delivery in terms of processes and impact on ECC postings?
    Thank you in advance for your collaboration,
    Fuffo
    Edited by: Fuffo Fuffi on Dec 21, 2010 2:36 PM

    Hi
    Confirmation Cancellation --> is used for reversing a confirmation which is posted wrongly in the system. This is generally used for reversing a faulty transaction.
    Return Delivery --> is used for sending the goods back to vendor. This happens when we receive goods from vendor and for some reasons the delivery does not meet customer's specification due to any reason. In these cases you record the goods movement as Return delivery sent back to Vendors.
    Regards
    Virender Singh

  • Difference between return delivery and cancellation

    What is the difference between return delivery and cancellation in  MIGO transaction.
    Can any one explain how to use them and where to use them.
    thanks

    HI there
    I will make it simple with figures,,
    Return Delivery
    PO- 100 nos
    GR-100 nos in to QI stock,,,
    After the Inspection- 95 nos Accepted, 5 nos Rework
    1. Return Delivery - Expecting the Subsequent Delivery- post the 5 nos into 122 (Return to Vendor), he will do the rework and provide the component back after the inspection if the qulaity is ok receive into 101
    2.Return Delivery- Not expecting the delivery back- post the 5 nos into 122 (Return to Vendor) and close the PO, if the payment already create the Credit memo for the 5 nos,,,
    Cancellation
    Ex:
    1. GR for the 100 nos into 103 instead of 101, so cancel the document through 104
    At the time of cancel the document, Always use the origin material document, so that
    1. All the data will be copied automatically
    2. Reversal Movement type will be defaulted
    3. Material Cost will be picked on the last material document,, if not it will pick the price from PO/Order.
    Hope it helps you
    Thanks
    Senthil

  • Difference between subsequent adjustment and return delivery ...?

    Dear all ,
    Provide difference between subsequent adjustment and return delivery ...?
    sri....

    Hi,
    Subsequent delivery means you have to reverse the goods receipts after
    entering corresponding invoice and you want to post another goods receipt
    than use subsequent delivery in MIGO with reference to old goods receipt
    number.
    Subsequent adjustment means updating the price difference in the quantity
    already supplied.
    Ex: Original invoice price is 100 for quantity of
    10 nou2019s, i.e., Invoice amount is 1000 after doing MIRO for amount
    1000 you get another supplementary Invoice for amount
    100 towards price revision. In this case  you have to adjust through subsequent
    adjustment.
    If your question was on posting logic for alternative posting of exchange rate differences. then,
    Subsequent adjustment*
    When you make a subsequent adjustment, the system posts all values with the exchange rate at the time of the goods receipt.
    Return Delivery
    If there is a return delivery, the posting date is based on the time of the goods receipts. The system converts the stock value using the average exchange rate with reference to the purchase order.
    Regards,
    Sadiq.

  • Difference between Return Delivery to Vendor - Against Material Document &

    Hi,
    Can any body explain in detail what is the difference between the below 2 scenarios-
    Difference between Return Delivery to Vendor - Against Material Document & Return Delivery to Vendor - Against Returns PO
    Thanks in adv
    Reg
    SSK

    Hi,
    Return delivery to Vendor against material document is done when you want to send the entire qty back to vendor and when your vendor invoice is not paid.
    You create Returns order, when you want to return some qty for which you can not trace any material document.
    For eg: During some festival season, you have purchased more stock. After that some stock is left with you which you would like to return to the vendor.
    Or you have found them damaged at a later point of time.

  • What is difference between sy-tabix and sy-index.

    SAP Seniors,
    Can you please let me know what is difference between sy-index and sy-tabix.
    I read the SAP help, it is confusing for me. it looks like both are same from help. please help me.
    Thank you
    Anitha.

    HI,
        Here is a brief description of difference between SY_TABIX and SY_INDEX and using them with several conditions.
    SY-TABIX
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX
    In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    Hope this helps.
    Thank you,
    Pavan.

  • Difference between sy-tabix and sy-index?

    tell me about sy-tabix and sy-index?what is the difference between sy-tabix and sy-index?
    Moderator Message: Please search before posting. Read the [Forum Rules Of Engagement |https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] for further details.
    Edited by: Suhas Saha on Jun 18, 2011 5:33 PM

    HI,
        Here is a brief description of difference between SY_TABIX and SY_INDEX and using them with several conditions.
    SY-TABIX
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX
    In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    Hope this helps.
    Thank you,
    Pavan.

  • The difference between system restore and last good known configuration

    hi,
    what is the difference between system restore  and last good known configuration.
    in which situation you use system restore ,and in which situation you use last good known configuration.
    very short answer wil be enough.
    thanks
    johan
    h.david

    Last Known Good Configuration deals only with Starting Windows eg. a bad registry or incorrect driver is preventing Windows to start.It recovers the registry settings of HKEY_LOCAL_MACHINE\System\CurrentControlSet
    While System Restore uses restore points to return your system files and settings to an earlier point in time without affecting personal files. Restore points are created automatically every week, and just before significant system events, such as the installation
    of a program or device driver. You can also create a restore point manually.You can undone system restore but there is no such option in Last Known Good Configuration.
    Last Known Good Configuration is disabled in Windows 8 or,Windows 8.1 by default.
    Try using Last Known Good Configuration if you can't start Windows, but it started correctly the last time you turned on the computer.
    Try using System Restore to return the system to an earlier point in time when things worked correctly.
    S.Sengupta, Windows Entertainment and Connected Home MVP

  • What is difference between report programming and dialog programming?

    hi,
    what is difference between report programming and dialog programming? plz provide some example code
    bye

    ABAP programming
    Basically reports are used to read database and represent the results in lists.
    Reports are collections of processing blocks that the system calls depending on events.
    We can use reports to evaluate data from database tables.
    Reports are stand alone programs and controlled by events.
    A report itself never creates events
    steps in report:
    Processing the selection screen
    Reading the database
    Evaluating the data and creating lists
    Outputting a list.
    1st u write simple logics, after that u can enhance the code as step by step.
    http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/index.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    http://www.sapdev.co.uk/reporting/reportinghome.htm
    Dialog Programming
    Structure of a Dialog Program
    A dialog program consists of the following basic components:
    Screens (dynpros)
    Each dialog in an SAP system is controlled by dynpros. A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step. The flow logic determines which processing takes place before displaying the screen (PBO-Process Before Output) and after receiving the entries the user made on the screen (PAI-Process After Input).
    The screen layout fixed in the Screen Painter determines the positions of input/output fields, text fields, and graphical elements such as radio buttons and checkboxes. In addition, the Menu Painter allows to store menus, icons, pushbuttons, and function keys in one or more GUI statuses. Dynpros and GUI statuses refer to the ABAP/4 program that control the sequence of the dynpros and GUI statuses at runtime.
    ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. The flow logic of a dynpro contains calls of modules from the corresponding module pool. Interactive modules called at the PBO event are used to prepare the screen template in accordance to the context, for example by setting field contents or by suppressing fields from the display that are not needed. Interactive modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
    All dynpros to be called from within one transaction refer to a common module pool. The dynpros of a module pool are numbered. By default, the system stores for each dynpro the dynpro to be displayed next. This dynpro sequence or chain can be linear as well as cyclic. From within a dynpro chain, you can even call another dynpro chain and, after processing it, return to the original chain.
    Check this link for basics.
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Check this link for Dialog Programming/Table Control
    http://www.planetsap.com/Tips_and_Tricks.htm#dialog
    Check this SAP Help for Dialog Program doc.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    Check this SAP Help link for Subscreens.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    Check this link for subscreen demo program.
    http://abapcode.blogspot.com/2007/05/demo-program-to-create-subscreen-in.html
    Also check this link too.
    http://abapcode.blogspot.com/2007/06/dialog-programming-faq.html
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld004.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ccf35c111d1829f0000e829fbfe/frameset.htm
    http://abapprogramming.blogspot.com/

  • Difference between connection pooling and simple connection

    Anybody please tell me what is the Difference between connection pooling and simple connection and also where we define connection pooling and how.
    Thanks
    Please reply soon
    amitindia

    Creating and closing connection to the database is a relatively slow process. Equally connections use database resources so you can't just open as many as you want.
    A connection pool maintains a number of open connections throughout the lifetime of the application. Instead of opening and closing the connections your application just "borrows" them from the pool when they're needed.
    If the pool runs out of connections it will usually create new ones as needed until you reach some predefined upper limit.
    A good connection pool will also manage connections which have failed for any reason, and report code which fails to return connections to the pool (ie connection leaks).
    The number of connections created at startup is referred to as the "low water mark" and the maximum number that the pool will allow to be opened at any given time is the "high water mark". If no connections are available client code will generally block until one is released.
    If by "defined" you mean where can you get a working implementation then your database or application server vendor is likely to provide one. Also the Apache Jakarta Commons includes [url http://jakarta.apache.org/commons/dbcp/]an implementation which you can use with any JDBC driver.
    Dave.

  • What's the difference between FM 'UPLOAD' and FM 'ALSM_EXCEL_TO_INTERNAL_T'

    What's the difference between FM 'UPLOAD' and FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    thanks!

    hi,
    Generally FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'  is used for reading Excel sheet i.e, either row wise or column wise . where as WS_UPLOAD will read the entire data in to an internal table in a file format.
    for illustration as how it is used check this out
    PARAMETER p_infile like rlgrap-filename.
    *START OF SELECTION
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = p_infile
                i_begin_col             = '1'
                i_begin_row             = '2'  "Do not require headings
                i_end_col               = '14'
                i_end_row               = '31'
           tables
                intern                  = itab
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading Excel Spreadsheet
      endif.
    http://www.sapdevelopment.co.uk/file/file_upexcelalt2.htm
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = gd_file
          has_field_separator     = 'X'  "file is TAB delimited
        TABLES
          data_tab                = it_record
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
        IF sy-subrc NE 0.
          write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
          skip.
        endif.
    http://www.sapdevelopment.co.uk/file/file_uptabpc.htm
    Regards,
    Santosh

  • Question about main difference between Java bean and Java class in JSP

    Hi All,
    I am new to Java Bean and wonder what is the main difference to use a Bean or an Object in the jsp. I have search on the forum and find some post also asking the question but still answer my doubt. Indeed, what is the real advantage of using bean in jsp.
    Let me give an example to illustrate my question:
    <code>
    <%@ page errorPage="errorpage.jsp" %>
    <%@ page import="ShoppingCart" %>
    <!-- Instantiate the Counter bean with an id of "counter" -->
    <jsp:useBean id="cart" scope="session" class="ShoppingCart" />
    <html>
    <head><title>Shopping Cart</title></head>
    <body bgcolor="#FFFFFF">
    Your cart's ID is: <%=cart.getId()%>.
    </body>
    <html>
    </code>
    In the above code, I can also create a object of ShoppingCart by new operator then get the id at the following way.
    <code>
    <%
    ShoppingCart cart = new ShoppingCart();
    out.println(cart.getId());
    %>
    </code>
    Now my question is what is the difference between the two method? As in my mind, a normal class can also have it setter and getter methods for its properties. But someone may say that, there is a scope="session", which can be declared in an normal object. It may be a point but it can be easily solved but putting the object in session by "session.setAttribute("cart", cart)".
    I have been searching on this issue on the internet for a long time and most of them just say someting like "persistance of state", "bean follow some conventions of naming", "bean must implement ser" and so on. All of above can be solved by other means, for example, a normal class can also follow the convention. I am really get confused with it, and really want to know what is the main point(s) of using the java bean.
    Any help will be highly apprecaited. Thanks!!!
    Best Regards,
    Alex

    Hi All,
    I am new to Java Bean and wonder what is the main
    difference to use a Bean or an Object in the jsp. The first thing to realize is that JavaBeans are just Plain Old Java Objects (POJOs) that follow a specific set of semantics (get/set methods, etc...). So what is the difference between a Bean and an Object? Nothing.
    <jsp:useBean id="cart" scope="session" class="ShoppingCart" />
    In the above code, I can also create a object of
    ShoppingCart by new operator then get the id at the
    following way.
    ShoppingCart cart = new ShoppingCart();
    out.println(cart.getId());
    ...Sure you could. And if the Cart was in a package (it has to be) you also need to put an import statement in. Oh, and to make sure the object is accessable in the same scope, you have to put it into the PageContext scope. And to totally equal, you first check to see if that object already exists in scope. So to get the equivalant of this:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart"/>Then your scriptlet looks like this:
    <%@ page import="my.pack.ShoppingCart %>
    <%
      ShoppingCart cart = pageContext.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        pageContext.setAttribute("cart", cart);
    %>So it is a lot more work.
    As in my mind, a normal class can also
    have it setter and getter methods for its properties.True ... See below.
    But someone may say that, there is a scope="session",
    which can be declared in an normal object.As long as the object is serializeable, yes.
    It may be
    a point but it can be easily solved but putting the
    object in session by "session.setAttribute("cart",
    cart)".Possible, but if the object isn't serializable it can be unsafe. As the point I mentioned above, the useBean tag allows you to check if the bean exists already, and use that, or make a new one if it does not yet exist in one line. A lot easier than the code you need to use otherwise.
    I have been searching on this issue on the internet
    for a long time and most of them just say someting
    like "persistance of state", "bean follow some
    conventions of naming", "bean must implement ser" and
    so on. Right, that would go along the lines of the definition of what a JavaBean is.
    All of above can be solved by other means, for
    example, a normal class can also follow the
    convention. And if it does - then it is a JavaBean! A JavaBean is any Object whose class definition would include all of the following:
    1) A public, no-argument constructor
    2) Implements Serializeable
    3) Properties are revealed through public mutator methods (void return type, start with 'set' have a single Object parameter list) and public accessor methods (Object return type, void parameter list, begin with 'get').
    4) Contain any necessary event handling methods. Depending on the purpose of the bean, you may include event handlers for when the properties change.
    I am really get confused with it, and
    really want to know what is the main point(s) of
    using the java bean.JavaBeans are normal objects that follow these conventions. Because they do, then you can access them through simplified means. For example, One way of having an object in session that contains data I want to print our might be:
    <%@ page import="my.pack.ShoppingCart %>
    <%
      ShoppingCart cart = session.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        session.setAttribute("cart", cart);
    %>Then later where I want to print a total:
    <% out.print(cart.getTotal() %>Or, if the cart is a JavaBean I could do this:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart" scope="session"/>
    Then later on:
    <jsp:getProperty name="cart" property="total"/>
    Or perhaps I want to set some properties on the object that I get off of the URL's parameter group. I could do this:
    <%
      ShoppingCart cart = session.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        cart.setCreditCard(request.getParameter("creditCard"));
        cart.setFirstName(request.getParameter("firstName"));
        cart.setLastName(request.getParameter("lastName"));
        cart.setBillingAddress1(request.getParameter("billingAddress1"));
        cart.setBillingAddress2(request.getParameter("billingAddress2"));
        cart.setZipCode(request.getParameter("zipCode"));
        cart.setRegion(request.getParameter("region"));
        cart.setCountry(request.getParameter("country"));
        pageContext.setAttribute("cart", cart);
        session.setAttribute("cart", cart);
      }Or you could use:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart" scope="session">
      <jsp:setProperty name="cart" property="*"/>
    </jsp:useBean>The second seems easier to me.
    It also allows you to use your objects in more varied cases - for example, JSTL (the standard tag libraries) and EL (expression language) only work with JavaBeans (objects that follow the JavaBeans conventions) because they expect objects to have the no-arg constuctor, and properties accessed/changed via getXXX and setXXX methods.
    >
    Any help will be highly apprecaited. Thanks!!!
    Best Regards,
    Alex

  • Difference between datatype NUMBER and NUMBER(38)

    Difference between datatype NUMBER and NUMBER(38)

    From
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements001.htm#i54330
    NUMBER Datatype
    The NUMBER datatype stores zero as well as positive and negative fixed numbers with absolute values from 1.0 x 10-130 to (but not including) 1.0 x 10126. If you specify an arithmetic expression whose value has an absolute value greater than or equal to 1.0 x 10126, then Oracle returns an error. Each NUMBER value requires from 1 to 22 bytes.
    Specify a fixed-point number using the following form:
    NUMBER(p,s)
    where:
    p is the precision, or the total number of significant decimal digits, where the most significant digit is the left-most nonzero digit, and the least significant digit is the right-most known digit. Oracle guarantees the portability of numbers with precision of up to 20 base-100 digits, which is equivalent to 39 or 40 decimal digits depending on the position of the decimal point.
    s is the scale, or the number of digits from the decimal point to the least significant digit. The scale can range from -84 to 127.
    Positive scale is the number of significant digits to the right of the decimal point to and including the least significant digit.
    Negative scale is the number of significant digits to the left of the decimal point, to but not including the least significant digit. For negative scale the least significant digit is on the left side of the decimal point, because the actual data is rounded to the specified number of places to the left of the decimal point. For example, a specification of (10,-2) means to round to hundreds.
    Scale can be greater than precision, most commonly when e notation is used. When scale is greater than precision, the precision specifies the maximum number of significant digits to the right of the decimal point. For example, a column defined as NUMBER(4,5) requires a zero for the first digit after the decimal point and rounds all values past the fifth digit after the decimal point.
    It is good practice to specify the scale and precision of a fixed-point number column for extra integrity checking on input. Specifying scale and precision does not force all values to a fixed length. If a value exceeds the precision, then Oracle returns an error. If a value exceeds the scale, then Oracle rounds it.
    Specify an integer using the following form:
    NUMBER(p)
    This represents a fixed-point number with precision p and scale 0 and is equivalent to NUMBER(p,0).
    Specify a floating-point number using the following form:
    NUMBER
    The absence of precision and scale designators specifies the maximum range and precision for an Oracle number.
    And
    2
    NUMBER[(precision [, scale]])
    Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127
    Sybrand Bakker
    Senior Oracle DBA

  • I want to know the difference between Days column and Day1 Column

    Hi All,
    I used this query:
    SELECT to_char(return_date_time,'dd/mon/yyyy hh24:mi:ss') Test,
    DECODE ('I', 'I', DECODE (1, NULL, NULL, 0, NULL, SYSDATE + 1)) Days,
    DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM fm_curr_locn
    WHERE patient_id = 'DU00002765'
    output: 
    Test
    Days
    Day1
    26/oct/2013 00:00:00
    26-OCT-13
    10/26/2013 3:06:59 PM
    I want to know the difference between Days column and Day1 column and why the days column didnt show the time
    Please anyone help.....
    Regards
    Shagar M

    Pleiadian wrote:
    It is the decode statement that is doing this.
    The format of decode is:
    decode(expression, search1, result1, search2, result2, searchn, resultn, default)
    All result fields must be of the same datatype and will be of the datatype of the first result (result1 in this example)
    In your example (the decode for the field Days) the first result is a NULL. I suspect (gurus? anyone?) that Oracle will use the varchar2 overload of the decode statement, and the date field will be converted to varchar2 using your NLS_DATE_FORMAT settings.
    In the second decode statment (Day1) the first result is of datatype date, so the result of the decode statement will be a date field (and will be parsed as such by your sql development tool)
    I agree, as NULL is the first result returned the datatype is undetermined, so Oracle is picking VARCHAR2 over others, and causing an implicit datatype conversion on the resultant date value, whereas the other which is returned as a date will use the local settings of the client tool being used.
    I can replicate the 'issue' in Toad, and it's rectified if we cast the first returned value of the decode statement...
    SELECT DECODE ('I', 'I', DECODE (1, NULL, CAST(NULL AS DATE), 0, NULL, SYSDATE + 1)) Days,
           DECODE ('I', 'I', SYSDATE + 1) Day1
    FROM dual

  • All differences between a function and a procedure.

    What are All differences between a function and a procedure.

    What are All differences between a function and a procedure.This is basic procedural programming fundamentals that you should learn at school.
    A function is a procedure that returns a value (of the type defined in the function declaration) using the RETURN statement at the terminal point of the processing code.
    That's the only difference.
    In terms of SQL, procedures cannot be used within SQL and functions can, but only if the function does not contain any OUT or IN OUT parameters and the return type is of a supported SQL type.

Maybe you are looking for