Is there any function like...?

Hi, I am new to Oracle and got a problem, may someone help me thanks in advance:
Is there any built-in function in Oracle like:
functionname(predication?action1,action2)
that means, if the predication is true, then do action1 else action2?
Thanks.

In PL/SQL, there is a BOOLEAN datatype you can use.
SQL> set serveroutput on
SQL> declare
  2      v_var boolean:=true;
  3      v_out varchar2(1);
  4  begin
  5      v_out:=case when v_var then 'Y' else 'N' end;
  6      dbms_output.put_line(v_out);
  7  end;
  8  /
Y
PL/SQL procedure successfully completed.Be aware, DECODE is only allowed inside a SQL statement, dislike the CASE as it has been showed here above.
Nicolas.

Similar Messages

  • Is there any function like malloc and free in labview?

    Im writing a vi that will handle my memory request.
    Im doing a very high speed video record sessions , and the frames cant be saves on hardisk in realtime), so im saving the frames on memory, and i want to use memory as
    much as i can(~2GB) and to save the maximum frames that i can save (and it depends on bit depth, height, width, total memory).
    VI Operations={
    Allocate Memory (frame width, frame height,TotalMemorySize) ,
    Add Frame(index) ,
    Get Frame (index),
    Free Memory
    In each record session, there will be a different FrameWidth and Height, so the maximum frame that i can save in memory may be different and equal to
    IndexMax=TotalMemorySize/(FrameWidth*FrameHeight)
    Im doing this by allocating a 3D array [FrameIndex , row , column]
    The fact that the width and height change in different sessions indicate  that i need an ability to free the previous allocated 3D array memory and allocate a new one.
    (lets say that i have 2GB total memory..)

    This request really takes the system and the programmer to the limits....
    First of all:
    LabVIEW does not have any functions like malloc and free. LV wants to prevent the user to have to think about stuff like this. On the other hand, the memory management in LV is therefore hard to do or even impossible, at least to such an extend as you request.
    Some thoughts about your application:
    1. If you want to have about 2GB of framedata in RAM during runtime, you will need the large memory awareness active. Otherwise, a 32 bit OS will give you "out of memory" messages. Refer to the LV help "VI memory usage".
    2. Storing the data in an array could be a difficult task. Arrays have to be in memory without any gap. Therefore, you'd encounter "out of memory" messages even if your RAM totals enough free memory (theoretical).
    3. The idea of linked-lists does not compy in LV since you cannot store pointers to structs (since those are abstracted from the user).
    4. Maybe you should take a look into vision. 
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Is there any functionality for AVERAGE in ALV, like do_sum, subtot?

    Hi Experts,
    In my_alv report, am doing sub/totals for prices, by using do_sum, subtot functions.........fine. But, I need to do/display the AVERAGE value for Discount % column?
    Is there any functionality for AVERAGE in ALV, like do_sum, subtot?
    thanq

    hi
    check these links out
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    regards
    vijay
    reward points if helpful

  • How can we get the image which is stored in clipboard by labview, is there any functions available like text from clip board

    How can we get the image which is stored in clipboard by labview, i can get the text in clipboard by using invoke node directly.but i cannot get the image, is there any functions or vi available.(image is in Png format)

    The Read from Clipboard method is, unfortunately, limited to text. If the clipboard contains an image then you need to use OS-specific functions calls. This is an example program for Windows. It's old, but it should still work.

  • Is there any function to automatically adjust the voice volume in the multitrack

    I'm trying to mix voice sounds and music files into one track. Sounds easy! But almost every music has its loud parts(for example the climax) and quiet parts. Therefore when i listen to the voice and the music at the same time, the voice files are sometimes relatively too quiet and sometimes to loud. I don want to adjust the volume pan one part after another because I have a lot of files to mix. Could you tell me is there any function I can use to automatically adjust the voice volume to make it always 'just a bit higher than the music'? Or can I read some documents about this problem?
    Thank you very much!

    Sounds like you want to do what is called "ducking" & "side chaining".
    First try using a compressor and or limiter on the voice tracks to get a more even volume.
    Google: Audio Ducking tons of stuff on how to.
    I myself have never tried this with Audition, or the compressors that come with it. I have done it in other multitrack software and older versions of Dave Browns Compressor.
    Duff

  • Is there any function module to convert the date format

    Dear ABAPers,
    Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
           I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
    Thanks & Regards,
    Ashok.

    hi,
    create custom function module or copy the below code in the report ..and use it
    the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
    FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(DATE) LIKE  SY-DATUM
    *"       EXPORTING
    *"             VALUE(FORMATTED_DATE)
    *"       EXCEPTIONS
    *"              INVALID_DATE
    TABLES: TTDTG.
    DATA: BEGIN OF T_DATE,
            YYYY(4) TYPE C,
            MM(2) TYPE C,
            DD(2) TYPE C,
          END OF T_DATE.
    DATA: DAY(3) TYPE N.
    DATA: VARNAME LIKE TTDTG-VARNAME.
    IF DATE IS INITIAL.
      CLEAR FORMATTED_DATE.
      EXIT.
    ENDIF.
    check document date format
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        DATE = DATE
      EXCEPTIONS
        PLAUSIBILITY_CHECK_FAILED = 1.
    IF SY-SUBRC NE 0.
      RAISE INVALID_DATE.
    ENDIF.
    MOVE DATE TO T_DATE.
    CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
    SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
    WRITE T_DATE-DD TO DAY.
    CONCATENATE DAY ',' INTO DAY.
    CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
      SEPARATED BY SPACE.
    ENDFUNCTION.
    the output is :--Convert a DATE field into a full format date eg. March 23, 2000
    Regards,
    Prabhudas

  • Is there any function to change the width of forms'graphic ?

    Hi All,
    Is there any function to change the width of forms'graphic ?
    May be like set***property.
    Thanks,
    ke xiong

    No. Graphics cannot be handled at runtime.
    Francois

  • Is there any function to change the width of froms'graphic ?

    Hi All,
    Is there any function to change the width of froms'graphic ?
    May be like set***property.
    Thanks,
    ke xiong

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
    Regard
    Helios

  • Is there any function module? Fiscal week no problem

    Hi friends,
    I want how to get physical week for given date.
    Ie for 01-04-2009 week no is 1.
    Is there any function module?
    Pls suggest
    Regards
    Moosa

    Hi,
    Use the below code.
    DATA: v_ersda TYPE sy-datum VALUE '20090618'.
    DATA: v_month(2) TYPE c,
          v_week(2) TYPE c,
          v_full_week LIKE scal-week.
    MOVE v_ersda+4(2) TO v_month.
    CALL FUNCTION 'DATE_GET_WEEK'
      EXPORTING
        date         = v_ersda
      IMPORTING
        week         = v_full_week
      EXCEPTIONS
        date_invalid = 1
        OTHERS       = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    MOVE v_full_week+4(2) TO v_week.
    WRITE:/5 'Month = ', v_month.
    WRITE:/5 'Week = ', v_week.
    Regards,
    Kumar Bandanadham

  • Is there any function module getting the cpu type?

    Is there any function module getting the cpu type?

    I guess the database server...
    I would like to get the SAP system cpu type as done in transaction st06 under system information.
    Thanks.

  • Is there any function module or BAPI to create maintenance item.(Urgent)

    Hi Experts,
                       I want to create an RFC which creates the maintenance item in the sap. The RFC is going to receive data from XI. So is there any function module or BAPI to create maintenance item? so that i can call that FM in my RFC.
    Thanks,
    Prasanna
    Helpful answers will be rewarded.

    Check and implement your program accordingly:
    *& Report  ZMRS_BAPI_DEMO_ORDERS
    REPORT  ZMRS_BAPI_DEMO_ORDERS.
    DATA: gs_method     TYPE bapi_alm_order_method,
          gs_header   TYPE bapi_alm_order_headers_i,
          gs_header_up  TYPE bapi_alm_order_headers_up,
          gs_return     TYPE bapiret2,
          gs_numbers    TYPE bapi_alm_numbers,
          gs_return_commit TYPE bapiret2,
          gs_demo_order TYPE objidext,
          gt_demo_order LIKE TABLE OF gs_demo_order,
          gt_method     LIKE TABLE OF gs_method,
          gt_header     LIKE TABLE OF gs_header,
          gt_header_up  LIKE TABLE OF gs_header_up,
          gt_return     LIKE TABLE OF gs_return,
          gt_numbers    LIKE TABLE OF gs_numbers,
          gt_return_commit LIKE TABLE OF gs_return_commit.
    DATA lv_not_successful TYPE c.
    DATA lv_ref_cnt TYPE i.
    IMPORT gt_method FROM MEMORY ID 'MET'.
    IMPORT gt_header FROM MEMORY ID 'HED'.
    IMPORT gt_header_up FROM MEMORY ID 'HUP'.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
      TABLES
        it_methods   = gt_method
        it_header    = gt_header
        it_header_up = gt_header_up
        return       = gt_return
        et_numbers   = gt_numbers.
    CLEAR lv_not_successful.
    LOOP AT gt_return INTO gs_return.
      IF gs_return-type = 'E'.
        lv_not_successful = 'X'.
      ELSEIF gs_return-type = 'W'.
       lv_not_successful = 'X'.
      ELSE.
      do nothing
      ENDIF.
    ENDLOOP.
    IF lv_not_successful <> 'X'.
    commit changes
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait   = 'X'
        IMPORTING
          return = gs_return_commit.
    ELSE.
    rollback changes
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
        IMPORTING
          return = gs_return_commit.
    ENDIF.
    EXPORT gt_return TO MEMORY ID 'RET'.
    EXPORT gs_return_commit TO MEMORY ID 'COM_RET'.

  • Is there any app like S health in samsung s4???? please mention name

    is there any app like S health in samsung s4???? please mention name

    Add a listener for EXITING event. AIR dispatches EXITING event on iOS when application is about to be exited. Your application can execute for around 5 seconds after receiving this event.
    NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);
    function onExit(e:Event):void
    // code to be executed upon exit.
    Please note that EXITING event is not dispatch if application is in suspended in background.
    -Neha

  • Is there any function module todelete decimal values

    hi all
    is there any function module todelete decimal values not converting charcter or numeric values i want to change my value with decimals to with out decimals.
    please give me suggetion.
    Thanks
    Ramana reddy

    hi dear
    you can use type P or I
    Data W_VAL type P.
    Data W_VAL type I.
    or assigned dictionary field like Mara-MATNR as getting your value
    Rewards if Useful.

  • If any function like greatest or least for addition,subtraction and multi?

    if any function like greatest or least for addition,subtraction and multi?
    there are two columns 'a' and 'b'...i have to add the values in column wise
    a b add
    10 30 -->40
    20 40 -->60
    IS there any function?

    Hi,
    794244 wrote:
    if any function like greatest or least for addition,subtraction and multi?
    there are two columns 'a' and 'b'...i have to add the values in column wise
    a b add
    10 30 -->40
    20 40 -->60
    IS there any function?Do you mean something like
    FUNCTION_X (a, b, c, d, ...)that would return the sum of all those numbers?
    No, not that I know of. If there were, it would be harder to use than
    a + b + c + d + ...The first is a comma-delimited list of columns, with a function name and parentheses.
    The second is a +-sign delimited list, with nothing else needed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is there any function that....

    Hello friends
          I wrote a ABAP program to print the PL (Part List). But while printing it jst takes 25 lines in the ckt refence else it don't print it. This is becoz of the reason that while printing it takes 1st ckt refence then 20 blank spaces then next ckt and so on. and it prints maximum of 500 characters. So if we have more than 25 lines we face problem. Is there any function that bypasses these 20 blank spaces and only consider the ckt refences. Plz help me in this. If possible sent me the code for it.
    Thnx
    Rakhi

    The table all_objects (and/or dba_objects) contains a column called last_ddl_time. Thus, a query like
    scott@jcave > SELECT max(last_ddl_time)
      2  FROM all_objects
      3 WHERE owner = 'SCOTT';
    MAX(LAST_DDL_TI
    28-NOV-03will tell you the last time any object owned by SCOTT had DDL issued against it.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

Maybe you are looking for

  • Creative MP3

    Hi, I have a Creative MP3 player. I tried loading the software disc on Mac but it was not recognised. My whole library is on the MP 3 player and so I want to avoid building a whole new library. Is there anyway I can avoid this and transfer the librar

  • Issue with Mac OS 10.8.3 and Anyconnect VPN Client 3.1.02026

    Hi all,   I am running Anyconnect VPN Client 3.1.02026 on Mac OS X 10.8.3.  I am unable to connect to my corporate network as the connection fails with following error : The VPN client was unable to successfully verify the IP forwarding table modific

  • Trouble connecting Windows 7 PC to Airport Extreme

    I cannot get my work pc to connect wirelessly to the Airport Extreme.  PC connects fine via ethernet.  All other devices in the house are Apple and work fine. Thanks

  • Real-time 8.6 Remote panel connection exceeds max number of licenses- with no connection​s

    I've been using the remote panel right along with no problems to connect to my Compact Fieldpoint.  This morning I accidently opened the connection twice on the same computer and tripped the "Remote panel connection exceeds max number of licenses" er

  • Cancel process order

    how to cancel process order confirmed in z program i mean details for cqancellation of process order phase wise and operation wise like tables, bapi