Similar to NVL function for SPACE

Is there any function which will detect SPACE
and update in that place to NULL.
like NVL(TEST_INPUT,NULL)

Is there any function which will detect SPACE
and update in that place to NULL.Check it out...
SQL> select replace('A P C', ' ', null) from dual
  2  /
REP
APC
SQL> Cheers, APC
Blog : http://radiofreetooting.blogspot.com/

Similar Messages

  • Using insert command in NVL function

    How can we use insert command in a NVL function
    exapmle : INSERT INTO employee
    VALUES ( (NVL ( (SELECT emp_id
    FROM employee
    WHERE emp_name LIKE 'Test'),
    (insert into employee values((select max(emp_id)+1 from employee),'Test')))));
    I mean i will check for the record to exist in the table and if not exist i will add it to the table.

    998504 wrote:
    How can we use insert command in a NVL function
    exapmle : INSERT INTO employee
    VALUES ( (NVL ( (SELECT emp_id
    FROM employee
    WHERE emp_name LIKE 'Test'),
    (insert into employee values((select max(emp_id)+1 from employee),'Test')))));
    I mean i will check for the record to exist in the table and if not exist i will add it to the table.The first thing caught my eye is this
    max(emp_id) +1A real bad piece of code. Never do that. Ever thought about multi user environment? Use a SEQUENCE.
    If you want EMP_NAME to be unique (Which looks strange to me), then just add a UNIQUE constraint. You dont try to do what oracle already does really well.

  • Compilation problems using NVL function in Pro*C subselect

    I have come across a weird oracle problem. When I execute the following query in SQLPlus it works but when
    I include it in Pro*C code in a EXEC SQL statement it gives syntax errors and fails to compile. Any idea what I am doing wrong.
    SELECT DISTINCT
         A.ID_PERSON,
         C.ID_STAGE_PERSON_LINK ,
         A.NM_PERSON_FULL,
         A.NBR_PERSON_AGE,
         A.ADDR_PERSON_ST_LN_1,
         A.ADDR_PERSON_CITY,
         A.ADDR_PERSON_ZIP,
         A.CD_PERSON_STATE,
         A.CD_PERSON_COUNTY,
         A.NBR_PERSON_PHONE,
         C.CD_STAGE_PERS_REL_INT
         FROM
              PERSON A,
              STAGE_PERSON_LINK C
         WHERE
         C.ID_CASE = 88776721
         AND          A.IND_INVALID_PERS IS NULL
         AND          C.CD_STAGE_PERS_TYPE = 'PRN'
         AND          C.ID_PERSON = A.ID_PERSON
         AND C.ID_STAGE_PERSON_LINK =
    NVL (
                   (SELECT MAX(F.ID_STAGE_PERSON_LINK)
                   FROM STAGE_PERSON_LINK F
                   WHERE F.ID_PERSON=C.ID_PERSON
                   AND F.ID_CASE = C.ID_CASE
                        AND F.CD_STAGE_PERS_TYPE = 'PRN'
                        AND F.CD_STAGE_PERS_REL_INT IS NOT NULL)
                   (SELECT MAX(G.ID_STAGE_PERSON_LINK)
                   FROM STAGE_PERSON_LINK G
                   WHERE G.ID_PERSON=C.ID_PERSON
                   AND G.ID_CASE = C.ID_CASE
                        AND G.CD_STAGE_PERS_TYPE = 'PRN')
    AND A.ID_PERSON NOT IN
    SELECT S.ID_PERSON
    FROM STAGE_PERSON_LINK S,STAGE T
    WHERE S.ID_CASE = C.ID_CASE
    AND S.ID_CASE = T.ID_CASE
    AND S.ID_STAGE = T.ID_STAGE
    AND T.CD_STAGE <> 'INT'
    MINUS
    SELECT H.ID_PERSON
    FROM STAGE_PERSON_LINK H, STAGE F
    WHERE H.ID_CASE = F.ID_CASE
    AND H.ID_STAGE = F.ID_STAGE
    AND H.ID_CASE = C.ID_CASE
    AND H.CD_STAGE_PERS_ROLE <> 'XE'
    AND F.CD_STAGE <> 'INT'
    This query returns data when run in sqlplus.When used in a Pro*C C program and compiled the precompiler complains with syntax errors when used with EXEC SQL DECLARE CLSS82D_CURSOR CURSOR FOR < query above >.However removing the NVL function and retaining the subselect clause compiles but that is not what I want to do.
    Syntax error at line 262, column 20, file clss82d.pc:
    Error at line 262, column 20 in file clss82d.pc
    SELECT MAX( F.ID_STAGE_PERSON_LINK )
    ...................1
    PCC-S-02201, Encountered the symbol "MAX" when expecting one of the following:
    ( ) * + - / . @ | at, day, hour, minute, month, second, year,
    The symbol "(" was substituted for "MAX" to continue.
    Syntax error at line 263, column 10, file clss82d.pc:
    Error at line 263, column 10 in file clss82d.pc
    FROM STAGE_PERSON_LINK F
    .........1
    PCC-S-02201, Encountered the symbol "FROM" when expecting one of the following:
    , ) * + - / | at, day, hour, minute, month, second, year,

    Pro*C works bit differently tha sqlplus. try removing the blank line after
    SELECT MAX(G.ID_STAGE_PERSON_LINK)
    FROM STAGE_PERSON_LINK G
    WHERE G.ID_PERSON=C.ID_PERSON
    AND G.ID_CASE = C.ID_CASE
    AND G.CD_STAGE_PERS_TYPE = 'PRN')
    good luck,
    Gauranga

  • Function for dates

    Hi Experts!
    i want to calculate months b/w 2 dates , is there function for this . can i find days and year  also .plz tell me .
    thanks.

    HAI TRY THIS
    REPORT  ZSAN_SDN2.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETER:
              N1 TYPE T,
              N2 TYPE T.
    DATA:     DN1 TYPE T,
              DN2 TYPE T,
              DN3 TYPE I,
              DN4 TYPE I,
              DN6 TYPE I,
              DN5 TYPE I.
    SELECTION-SCREEN:
    BEGIN OF LINE,
    PUSHBUTTON 2(10) BUT1 USER-COMMAND CALC,
    PUSHBUTTON 13(10) BUT2 USER-COMMAND EXIT,
    END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN 'CALC'.
          MOVE: N1 TO DN1,
                N2 TO DN2.
          DN3 = DN2 - DN1 .
          DN3 = DN3 MOD 86400.
          DN4 = DN3 / 3600 .
          DN6 = DN3 / 60 .
          DN5 = DN6 MOD 60.
          DN3 = DN3 MOD 3600 .
          DN3 = DN3 MOD 60 .
          LEAVE TO LIST-PROCESSING.
          SET PF-STATUS SPACE.
          WRITE: / DN4, 'hours'.
          WRITE: / DN5, 'minutes'.
          WRITE: / DN3, 'seconds'.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    INITIALIZATION.
      BUT1 = 'calc'.
      BUT2 = 'exit'.

  • How to use cursor function for nested xml

    Hi,
    i have a query for XMLQuery like
    select * from bills where bill_id=????
    it results in something like
    <bills>
    <bill>
    <city>london</city>
    <amount>44</amount>
    </bill>
    <bill>
    <city>london</city>
    <amount>988</amount>
    </bill>
    <bill>
    <city>new york</city> <amount>59</amount> </bill>
    </bills>
    but i want xml output to be sorted for city names adding one more level location like
    <bills>
    <location city="london">
    <bill>
    <amount>44</amount>
    </bill>
    <bill>
    <amount>988</amount> </bill>
    </location>
    <location city="new york">
    <bill>
    <amount>59</amount> </bill>
    </location>
    </bills>
    it should be possible to iterate through the same table to gather informaton with the help of cursor function, but never used CURSOR before.
    any idea?

    sreese wrote:
    p_desig works as a comma delimited string without the NVL function, that's not the issue.
    It IS the issue .. you need to provide  a SAMPLE so we can see what you're doing ..
    How are you "passing it in" ?
    option A:
    procedure ( in_var  in  VARCHAR2 )
    AS
    and nvl(sn.c_attribute1,'x@#$%') in nvl(in_var,'x@#$%')
    option B:
    and nvl(sn.c_attribute1,'x@#$%') in nvl(&1,'x@#$%')
    .. or some other method?

  • Max function for table having no rows

    Hi All
    I have a table in which initially no rows. I am running max() function for a column and then wnats to add 1.
    But when no rows there below code in not working
    select max(code) into p_maxCode from cms_codedetails where codetypeid=0;
    p_maxCode:=p_maxCode+1;
    dbms_output.PUT_LINE('p_maxCode: '||p_maxCode);
    result is:
    p_maxCode:
    How can I handle the this to get 1 if no rows in the table .

    Hi !
    Max function in yur case returns NULL and then
    null + <anything> ... is still null
    You can do
    p_maxCode:=nvl(p_maxCode,0)+1;
    or
    select nvl(max(code),0) into p_maxCode from cms_codedetails where codetypeid=0;
    Of course if YOU have decide that null in this case can be treated as 0
    T

  • NVL function's strange behaviour

    Hi,
    I have a sql statement (listed below) that uses NVL function which returns either the business name of branch name depending on whether the business name is null or not. It also uses the branch_name pl/sql function that returns the name of the branch.
    What I found strange was that it executes the branch_name function even when the business_name is not null. It was my understanding that nvl returns expr1 if it's not null, and expr2 if expr1 is null. I don't want it to execute the branch_name function if business_name exists. Is it possible using NVL, or do I need to use DECODE to achieve that? p_record_id is a parameter that I pass to the function containing the sql statement e.g., p_record_id=10.
    SELECT nvl( business_name, branch_name( p_record_id) ) "Name"
    FROM entity
    WHERE record_id = p_record_id;
    Thanks
    Vic

    Marc,
    Thanks for looking into it.
    I just ran the code using DECODE and it seems that it executes the function only when the condition is true, which is exactly what I want. It won't execute the function if the condition is false, e.g., in the code below if the business_name is null then it executes the branch_name function, other wise it returns the business_name.
    SELECT DECODE ( business_name,
    null, branch_name( p_record_id ),
    business_name ) "Name"
    FROM entity
    WHERE record_id = p_record_id;
    Vic

  • Why does Acrobat allocate more width for spaces than for alphanumeric characters?

    When I convert a text file to PDF using Acrobat X Pro, I select a fixed-width font.  However, it appears that Acrobat allocates a greater width for space characters in the text file, than it does for alphanumeric characters in the text file.  How do I instruct Acrobat to use exactly the same width for all the characters, both spaces and visible characters?
    This question is actually a re-write of my previous post titled, ‘Bulk Convert Text to PDF with Acrobat’.  I know what the problem is now but do not how to fix it.
    Here's a mock example of the content of a text file.  In the resulting PDF, the H no longer lies directly under the G.  I chose Courier New 8 pt for the font.
        ABCDEFG    ABCDEFG    ABCDEFG    ABCDEFG    ABCDEFG    ABCDEFG
              H          H          H          H          H          H
    Any suggestion will be appreciated.  Thank you.

    If you are comfortable with the settings in the printing, then go back to the PDF Maker settings (create PDF preferences in WORD) and adjust the preferences for similar performance, at least in the job settings and such. The rest deals with how much you want the bookmarks and such.
    I am assuming that those PDF Maker preferences set in WORD are retained when you run the conversion from Acrobat that I have the impression you are doing. Other than that, check the conversion settings in Acrobat itself. They are in the preferences. If you the printer preferences are used when converting from Text (you will have to try to see what happens), it would use the default preferences of the printer, not those set in the print menu of an application. The latter only last as long as that application is open and only for that application. For your need, you may need to change them in either the printer (Start>Printers.. in windows) or Distiller, or both. The printer overrides the Distiller settings usually (another setting on this).

  • Order Partner Functions for VENDORs

    Hi All,
    We are using CRM 5.0 and ECC 6.0. We successfully replicated all the VENDORs from ECC to CRM BPs with BBP000-VENDOR role as this features is supported from CRM 5.0.
    We are now trying to get the VENDOR Partner functions replicate from ECC sales order to the Partner Functions for the CRM ORDERS. Looks like SAP doesn't support this feature yet. I am getting the Partner Functions (say Z1 - Freight Carrier ) but the partner data is BLANK. So i am working on a workaround.
    My Issue I am using ORDER_SAVE BADI to enter a BP from CRM to this Partner Function that is coming empty to CRM. For some reason my code is not working. Below is my code
    Data declarations for VENDOR Partner Function*********
      data: lt_partner_ref           type CRMT_PARTNER_EXTERNAL_WRKT,
              ls_partner_ref          type CRMT_PARTNER_EXTERNAL_WRK,
              lt_partner                type CRMT_PARTNER_COMT,
              ls_partner               type CRMT_PARTNER_COM,
              lt_partner_act          type CRMT_PARTNER_COMT,
              lt_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM_TAB,
              ls_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM.
      data:lt_header_ref   type crmt_object_guid_tab,
             guid                type crmt_object_guid.
      guid =  iv_guid.
      insert guid into table lt_header_ref .
      call function 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid       = lt_header_ref
        IMPORTING
          et_partner            = lt_partner_ref                 
        EXCEPTIONS
          document_not_found   = 1
          error_occurred            = 2
          document_locked       = 3
          no_change_authority  = 4
          no_display_authority  = 5
          no_change_allowed   = 6
          others                      = 7.
    Start of the code to VENDOR PARTNER FUNCTIONS for ORDER Heafer/Item ***********
        Read table lt_partner_ref into ls_partner_ref with key partner_fct = 'Z0000007'.
        if ( sy-subrc = 0 ).
            ls_partner-kind_of_entry = 'C'.
            ls_partner-partner_fct = 'Z1'.
            ls_partner-partner_no = '0010060331'.
            ls_partner-display_type = 'BP'.
            ls_partner-no_type = space.
            ls_partner-REF_HANDLE = '100'.
            INSERT ls_partner INTO TABLE lt_partner.
            ls_input_names-fieldname = 'KIND_OF_ENTRY'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_FCT'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_NO'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'DISPLAY_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'NO_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'REF_HANDLE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_field-ref_guid = ls_partner_ref-ref_guid.
            ls_input_field-objectname = 'PARTNER'.
            ls_input_field-ref_handle = '100'.
            ls_input_field-logical_key = '0000'.
            ls_input_field-ref_kind = 'B'.
            INSERT ls_input_field INTO TABLE lt_input_field.
          Endif.
      call function 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_partner           = lt_partner                         "I added this for VENDOR PF
        CHANGING
          ct_input_fields   = lt_input_field
        EXCEPTIONS
          error_occurred         = 1
          document_locked    = 2
          no_change_allowed = 3
          no_authority           = 4
          others                   = 5.
    endmethod.
    Could anyone check my code and suggest any changes?
    Thanks,
    Karuna.

    Hi ROshan,
      Open customer master in XD02  sales view and save it then check in XD03 it should display the partner functions.
    As you said the account group has been changed I think the records needs to be saved again.

  • Binding problem when using NVL function

    Hello.
    I have a problem with my ADF application (11.1.2.1).
    I use VO with a query (database view) - pivot table.
    If i use where clause like table.attr = :p_attr, everything works ok.
    If i use where clause like table.attr = NVL (:p_attr, table.attr) and put a value in :p_attr (executeWithParam) , query executes as if there is a null value.
    Debug console shows:
    Binding null of type 12 for "p_attr".
    Query with NVL works ok in sqldeveloper.
    But in jdev, as if the table attribute isn't bind to bind variable.
    If a just remove NVL function, it works.
    Any idea?
    Thanks.
    Regards
    Edited by: DejanH on Oct 6, 2011 1:32 PM

    Hello.
    I enter 50 in p_depart parameter and click "ExecuteWithParams". Query is executed and shows records (pivot table).
    But if i look at the log window i see that an empty query was executed first.
    <OracleSQLBuilderImpl> <bindParamValue> [427] Binding null of type 12 for "p_depart"
    <OracleSQLBuilderImpl> <bindParamValue> [428] Binding null of type 12 for "p_job"
    <OracleSQLBuilderImpl> <bindParamValue> [429] Binding null of type 12 for "p_hire_od"
    <OracleSQLBuilderImpl> <bindParamValue> [430] Binding null of type 12 for "p_hire_do"
    Then, it is autoexecuted for the second time with parameter set to the value i inserted.
    <OracleSQLBuilderImpl> <bindParamValue> [470] Binding param "p_depart": 50
    <OracleSQLBuilderImpl> <bindParamValue> [471] Binding null of type 12 for "p_job"
    <OracleSQLBuilderImpl> <bindParamValue> [472] Binding null of type 12 for "p_hire_od"
    <OracleSQLBuilderImpl> <bindParamValue> [473] Binding null of type 12 for "p_hire_do"
    The same happens in our query. But ours is much more complex and it takes a lot of time to first execute "empty" query and then with inserted parameter.
    We cannot use it.
    It looks like bug.
    Regards
    Edited by: DejanH on Oct 11, 2011 6:52 AM

  • Help in using listagg function for more than 8000 char.

    Hi Friends,
    Need you urgent help in using listagg function for more than 8000 char.
    I did the below sample SQL and in "e_orig" and "d_orig" for upto 4000 char it is working fine but I have to use it for more than 8000 char. and it is giving error,
    I checked the listagg function is having limitation of 4000 char.
    I tried but I am unable to achive this. Can someone provide me a sample example to achive this
    select d.dname,d.loc,e.hiredate
    ,listagg(e.ename,',' ) within group (order by e.deptno) over (partition by e.deptno) as e_orig
    ,listagg(e.ename, ',') within group (order by e.sal) over (partition by e.deptno) as d_orig
    from emp e, dept d
    where e.deptno=d.deptno;[ This is my first post, I gone through the guideline for posting a post , and try to go according to that ( I have not pasted here create table and insert as I have used basic table emp, dept for example), please let me know if still I should give this, I will take care from my next post ]
    Thanks in advance

    Interesting, I didn't know you could do that, but...
    BluShadow wrote:
    You could write some PL/SQL code that does it all for you, but that would involve loops and would be slow.Well, objects are written in PL/SQL aren't they? And presumably there'll be implicit looping too? So it's not at all obvious that this method will be faster than doing the joining in PL/SQL in memory. The only way to find out is to benchmark them - so I have done that.
    I noticed that OP's ref cursor actually only ever retrieves a single record for a bound department number, so I decided the best thing would be to test using a procedure that passes an output string back. I selected all (109) employees and put spaces in to ensure above 4000 characters. I also noticed that as he is using PL/SQL he probably can use a VARCHAR2 type, but just not ListAgg in the query, so I wrote short procedures as follows:
    SimpleAggChr     - bulk collect and array processing, VARCHAR2 output
    ClobAggPrc     - the custom aggregation method, CLOB output
    SimpleAggClob     - bulk collect and array processing, CLOB output
    I then wrote a driving script that calls them in the order above and times each call (I like benchmarking so I have my own timing object to make it easy). I then print the lengths for checking, and my object writes the timings to my output table. Running a few times I got varying results, but generally it looks like there isn't a lot to choose between them for performance.
    Here's the procedure code:
    CREATE OR REPLACE TYPE char100_list_type AS TABLE OF VARCHAR2(100)
    CREATE OR REPLACE PROCEDURE SimpleAggChr (x_out OUT VARCHAR2) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggChr;
    CREATE OR REPLACE PROCEDURE SimpleAggClob (x_out OUT CLOB) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggClob;
    SHO ERR
    PROMPT ClobAggPrc
    CREATE OR REPLACE PROCEDURE ClobAggPrc (x_out OUT CLOB) IS
    BEGIN
      SELECT clobagg(first_name || '                                        ' || last_name || ',')
        INTO x_out
        FROM employees
       ORDER BY salary;
    END ClobAggPrc;
    SHO ERRand the driving script:
    SET SERVEROUTPUT ON
    SET TIMING ON
    DECLARE
      l_enames_c1     CLOB;
      l_enames_c2     CLOB;
      l_enames_v     VARCHAR2(32767);
      l_timer     timer_set_type := timer_set_type ('Aggregation');
    BEGIN
      Utils.g_id := 'Aggregation';
      SimpleAggChr (l_enames_v);
      l_timer.Increment_Time ('SimpleAggChr');
      ClobAggPrc (l_enames_c1);
      l_timer.Increment_Time ('ClobAggPrc');
      SimpleAggClob (l_enames_c2);
      l_timer.Increment_Time ('SimpleAggClob');
      DBMS_Output.Put_Line ('SimpleAggChr returned string of length ' || Length (l_enames_v));
      DBMS_Output.Put_Line ('ClobAggPrc returned string of length ' || Length (l_enames_c1));
      DBMS_Output.Put_Line ('SimpleAggClob returned string of length ' || Length (l_enames_c2));
      l_timer.Write_Times;
    END;
    SET TIMING OFF
    SET LINES 150
    SET PAGES 1000
    COLUMN id FORMAT A30
    COLUMN line_text FORMAT A120
    SELECT line_text
      FROM output_log
    WHERE id = 'Aggregation'
    ORDER BY line_ind
    /and the results:
    SimpleAggChr returned string of length 5779
    ClobAggPrc returned string of length 5779
    SimpleAggClob returned string of length 5779
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:27.05
    LINE_TEXT
    Timer Set: Aggregation, constructed at 03 Nov 2011 16:27:07, written at 16:27:35
    ================================================================================
    [Timer timed: Elapsed (per call): 0.02 (0.000016), CPU (per call): 0.01 (0.000010), calls: 1000, '***' denotes corrected
    line below]
    Timer              Elapsed          CPU          Calls        Ela/Call        CPU/Call
    SimpleAggChr          9.84         0.36              1         9.84400         0.36000
    ClobAggPrc            9.37         0.32              1         9.37400         0.32000
    SimpleAggClob         8.25         0.22              1         8.25000         0.22000
    (Other)               0.00         0.00              1         0.00000         0.00000
    Total                27.47         0.90              4         6.86700         0.22500
    13 rows selected.

  • Can i use create function for MSSql scalar and table valude function.

    Hi,
    1) Can i use create function for MSSql scalar and table valued function?
    2) How many type of user defined function are there in oracle 11g express?
    3) And can i reture any "type" form user defined function?
    yourse sincerely

    944768 wrote:
    Q1)That means even if i return predefined types like integer, varchar2 then also PGA is used ?The data type does not determine where the variable is stored. A string (called a varchar2 in Oracle) can be stored in stack space, heap space, on disk, in a memory mapped file, in a shared memory, in an atom table, etc.
    It is the who and what is defining and using that string, that determines where and how it is stored.
    The Oracle sever supports 2 languages in PL/SQL. The PL (Programming Logic) language is a procedural/declarative language. It is NOT SQL. SQL is integrated with it. The PL/SQL engine uses private process memory (PGA). So PL/SQL variables exist in the PGA (but there are exceptions such as LOBs).
    Q2) So please suggest me solution in oracle.Sounds to me you are looking at how to implement a T-SQL style function as an Oracle function, and once implemented, do joins on the function.
    Do not use PL/SQL in SQL in place of a SQL select. It is not T-SQL.
    One cannot use PL/SQL to create functions along the style of T-SQL, where the function executes a SQL using some conditional logic, and then return as if the function was a native SQL select.
    T-SQL is an extension to the SQL language - making it a hybrid and very impure language implementation. PL is based on ADA - part of the Pascal family of languages. The E-SQL (embedded SQL) approach used in languages like C/C++, Cobol and Ada, has been transparently done in PL/SQL. You can write and mix PL code and variables with SQL code. And the PL/SQL engine figures out how to make the call from the PL/SQL engine to the SQL engine.
    But PL/SQL is not "part" of the SQL language and does not "extend" the SQL language in a T-SQL fashion.
    So you need to check your SQL-Server preconcepts in at the door, as they are not only irrelevant in Oracle, they are WRONG in Oracle.
    The correct way in Oracle, in a nutshell - Use the SQL language to do data processing. Use PL/SQL to manage conditional process flow and the handling of errors.

  • SAP IDM 7.2: How to setup SSO functionality for WebUI of CRM and GRC?

    Hello IDM-experts,
    where can my customer find information about
    SAP IDM 7.2: How to setup SSO functionality for WebUI of CRM and GRC?
    Customer situation description:
    The situation is that we are using SAP IDM 7.2. We are using a functionality to allow our users to access a webpage from where they can gain
    SSO access to the Abap systems via the SAPGui. See screenshot as an example.
    Now what we want is to access the CRM and GRC WebUI also with the same SSO possibility. We cannot find any guide/best practice on how to do
    this or if it is possible via SAP IDM 7.2.
    You can see a weblink in the first screenshot but it does not work. It will ask you for a username and password, see second screenshot.
    Kind regards,
    Daniela

    Do you know how the SAP GUI SSO is setup ? Is it using SNC/Kerberos ?
    If it is (I suspect it is), then you will need to use similar method of authentication for the ICF Services. These cannot use SNC since they are accessed via browser, but what you want is possible.
    Thanks
    Tim

  • Any RunningApplications-like function for non-windowed processes?

    Am I missing any RunningApplications-like function for non-windowed processes like Unix executables? To start with I'd settle for processes in user-space but would ultimately like to list processes like Activity Monitor does. Even comparing RunningApplications results to user space Activity Monitor results will show the difference.
    As far as I can tell you need to go all the way down to kauth and kernel space to watch for non-windowed processes being launched. Is there somethig in-between I'm missing? A notification device about launching apps would be perfect if it cover all processes.
    Thanks,
    =Tod

    I think kqueue may be able to do what you want. Look at the EVFILT_PROC filter. You may have to watch a number of processes - perhaps all of them. But that would tell you any time you get a fork and whenever a process is reaped.
    I looked at kqueue at it does what I want but you need to register it on a by process/file basis which is great for a very specific set of things but not for overall system watching. (I also looked at fsevents but it is designed as a post-event notification system.) While NSWorkspace has the usual Cocoa model notifcation willlaunchApp, didlaunchApp, etc it seems that you need to get the kernel to watch the launch lifecycle of non-windowed functions.
    I actually did manage to get a comprehensive list of running apps out of parsing sysctl output with much less trouble than I expected. So far I have managed to get the pid, uid and abbreviated processname and the list seems to match the Activity Monitor list - at least at this testing printf stage. Getting the username from uid should be trivial and the full file name is doable it just requires some struct length and offset math. I'd like the launch path information but I can live without it for monitoring purposes if I can't figure out how to get it.
    This means that the monitoring part of the running system seems relatively straight forward - wrapping the call in an NSTimer and watching for changes in the returned results. But the watching of the actual starting and stopping of all processes remains some deeper work.
    Thanks for all the suggestions,
    =Tod

  • How can I use FlexMotion vector move function for cartesian coordinate system to other coordinate.

    I have problem with convesion from cartesian coordinate system to other one. I need use standard move function for example blend to moving 2 arms manipulator. What i need to do?

    The vector move will probably not give the results you are looking for. The vector move calculates the trajectory based on unit vectors in cartesian space. For a 2 arm robot (ex. 2 rotation joints), you would be able to move from point A to point B as desired, however the path would not be a straight line. The path may also not be suitable for the mechanism, which could cause a collision or maybe a singularity.
    The best solution is probably the contour move. You can use the inverse kinematic routine you wrote and send the results to a contour move. Contour moves are a little more complicated to use than the simple one axis or vector moves, however they are also much more flexible. I do not know of any functions already written for your system,
    but it sounds like you are already on the right path.
    Regards,
    Brent Runnels
    Applications Engineer
    National Instruments

Maybe you are looking for