Split Parameter

hi all,
i m passing a parameter to function. this parameter can be a word or series of words like 'abc' or 'abc def ..'
how i split this parameter string into each separate word in function,
means if it is find a 'space' in sentence, it should split from that location? i m using 9i db or 10g db.
thanks

And in 9i
SQL> with t as (
  select 'abc def ghi' txt from dual
select txt, extractvalue(column_value, 'e/text()') txt2
   from t, table(xmlsequence(xmltype( '<e><e>' || replace(txt, ' ', '</e><e>') || '</e></e>').extract('e/e')))
TXT         TXT2                         
abc def ghi abc                          
abc def ghi def                          
abc def ghi ghi                          
3 rows selected.

Similar Messages

  • How To Split Parameter Values

    Hello,
    I have the following code which generates a lot of values stored in Parameter Values. How do I split this to see the individual values. Is it an array?
    Nevica
    Attachments:
    Capture.JPG ‏25 KB

    Hi nevica,
    The data type which is produced from this function is called a Cluster. Clusters are essentially a data type which allows the concatenation of multiple entries of data, quite like an array; however they allow entries of different data types rather than just one.
    For example, the error terminals you have wired together contain a special type of Cluster called an Error Cluster. Error Clusters contain three different data types:
    Status -  a Boolean which indicates if an error has occurred.
    Code - a Numeric data type which contains a number which represents the specific error that occured.
    Source - a String data type which indicates where in your VI the error occured.
    These different data types are bundled together because they all logically represent different aspects of an Error.
    In your VI, the parameter that is returned is of type cluster. If you right click on the cluster indicator and navigate to Create » Cluster, Class and Variant » Unbundle you will create a small node which can be used to view the individual contents of a cluster separately. You can stretch out the Unbundle function to view more entries of the parameter set. To place these items once you've manipulated back into their original cluster, use the Bundle function.
    Best regards,
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • How to Split parameter in OSB(Proxy Service) ?

    Hi,
    i'm Newby in OSB.
    I get the WSDL from the target system, and the response from the wsdl that is lines with a separator / delimiter "|".
    Examples: getLOANKep.wsdl at invoke in SOAP UI and Business Services in OSB with the result:
    1|andri|19021985|jakarta|500000|aktif
    My question is, how do I break the line above in the "Proxy Service" to:
    <RefNo> 1 </ RefNo>
    <Full name> andri </ Full Name>
    <Date of birth> 19021985 </ Date of birth>
    <place of birth> jakarta </ place of birth>
    <loan limit> 500 000 </ loan limit>
    <status> aktif</ status>
    I need your help ASAP:)
    Regards,
    Leo regar

    Hi Prabu and Pierluigi,
    Does MFL is only required when you want to transform the XML into non-xml and non-xml to xml. ?
    Because, my question is , from a business service I get the results or response from the wsdl , So it's not a flat file but the XML result.
    1|andri|19021985|jakarta|500000|aktif --> Response from business Service on Test Console In OSB.(XML)
    So, how do I split from XML (business service) to XML (proxy service)? so the result as xml below:
    <RefNo> 1 </ RefNo>
    <Full name> andri </ Full Name>
    <Date of birth> 19021985 </ Date of birth>
    <place of birth> jakarta </ place of birth>
    <loan limit> 500 000 </ loan limit>
    <status> aktif</ status>
    Need your help :)
    Thank and Regard,
    Leo
    Edited by: user13144072 on May 9, 2011 2:46 AM

  • EDI using Seeburger BIC

    Hi,
    I am using the BIC module provided by Seeburger for EDI to XML conversion. The input EDI message is a 850 version 4010 message. I have configured the sender communication channel for Functional Acknowledgement and configured the message splitter which is working fine.
    When I run this scenario for a few of the test files with a 850 4010 message, the classifier module does not recognise the EDI message as a 850 4010 message and hence the mapping(See_E2X_ANSIX12_850_V4010) is not called. There are no errors in the sender communication channel monitoring and I get only the functional acknowledgement message.
    There is a warning message in the CC monitoring which says SEEBURGER/MSGSPLITTER: There is no attachment to split. So there is nothing to do
    Am is missing anything here? If so could you please throw some light on this issue.
    I have seen this thread Re: SEEBURGER/MSGSPLITTER: There is no attachment to split., but could not get much info.
    Thanks,
    Chandra

    Hi Frederic,
    I have configured the message splitter in the seeburger work bench and the split parameter has been set to true in the module configuration. As per my understanding, the 997 message will have a rejected status only if the EDI mapping is called, but this apparently never happens and my guess is that the 850 4010 message is not recognised by the classifier.
    The setting works perfectly with one of my test files which is a 850 message as well, so the configuration is right. The situation described in my query occurs for a few 850 messages, since the test data is obtained from several partner systems.
    Thanks,
    Chandra

  • How to use AUTO in Mapping name for EDIFACT

    Hi
    I have a source which will be posting 2 diff kinds of EDIFACT  to XI.
    I want to use just a single channel where i want to configure my .sda module.
    I've seen that we can use 'AUTO' in MappingName parameter, so that the mapping is chosen dynamically.
    However,when i tried to do so, i get an error saying that the adapter cannot find the mapping in the classpath.
    Can anyone guide me as to how to use the AUTO parameter?
    If possible, provide a link for some blog where they are using it.

    Hi Alok,
                  Reason behing not getting the EDI payload was missing of splitter configuration, you need to configure the splitter as
    you need to use AUTO mappingName instead of specific mapping name
    once you configure split parameter of bic  to true, it will generate an attacments like KEY|MAPPINGNAME|ACCEPTED|MessageNo
    then based on this configuration splitter will look for the same key in Seeburger workbench configuration and then generates a XI message (SXMB_MONI entry) ...
    If you dont want acknowledgement of EDI and sure about the version of the mapping then you can configure the mappingName
    directly instead of AUTO...in BIC paramter
    HTH
    Rajesh

  • Use of Seeburger Classifier withour splitter?

    Hello,
    Can you please let me know if we can use Seeburger Classifier without splitter?
    if this is possible,can you please suggest relevant links which explain such scenario?
    Than

    Hi Shweta,
    It's a little while since I've used Seeburger but I seem to remember the following, which I hope will help you.
    Seeburger Classifier creates an attachment by the name of the "attName" parameter you submit to the Classifier module.  If you do not submit an "attName" parameter value, the Classifier module will use a default value.  You can see the classifier attachment in SXI_MONITOR - it is simply a set of information about what the Classifier determined about the message.
    Where the Seeburger mapping module parameter setting is mappingName=AUTO (instead of a static mappingName of the a single mapping, e.g. mappingName=AnsiX12_812_V4030) it will attempt to use the classification xml attachment which was (in the case of where you specify mappingName=AUTO) expected to be have been created earlier in the module chain - again, if no classifierAtt parameter value is specified to provide the name used for the Classifier module's attName (attachment name) then I believe Seeburger mapping module uses the default.  I think the default behaviour of Seeburger mapping module when using mappingName=AUTO is also to split by default, and creates the FunctionalAck in place of the whole message.
    I believe there are two solutions to your problem (without getting into developing AF modules):
    The first, and easiest, way to get Seeburger mapping module to not produce an Ack and to map 1-to-1, is to leave the Classifier module out of the chain and to specify your exact mapping in order for it to perform a 1-to-1 mapping.  In order to do this you will need to know what file is coming in on your Sender channel.
    The second way is that there is a "split" parameter (true/false - true by default for AUTO), and (if I remember correctly) a splitMode parameter too.  The long and short of it here though, is that the ability to support these parameters' usage to enable 1-to-1 mapping on a mappingName=AUTO will be down to your master (e.g. AnsiX12_Company, EDIFACT_Company, TRADACOM_Company) mappings which are used to then branch out to the per-instance mappings which are message name/version specific (e.g. AnsiX12_810_V4010, EDIFACT_ORDHDR_V9).  If using these parameters does not automatically get your 1-to-1 mapping working, you may require some consultancy from Seeburger to enable the 1-to-1 mapping for Classifier driven mapping - I seem to remember this not being a very straightforward process.
    Kind regards.

  • How to print Iview contents only

    Hello All,
    How to print IView contents only instead of the whole portal. If I use javascript function, it prints whole screen. I want to print only the IVIEW contents. IView has tableview.
    Thanks in advance,
    Praveen

    Hi,
    we are using a 7.0 SP 16 Portal.
    If you have an light portal with an low EPCF level maybe the option will not be shown.
    Try it with the default SAP Portal Style as admin in that case you have an high EPCF level and you also should see the print option.
    If your iview is embeded inside a page this can have different effects. Please test it with an stand alone iView before.
    So with the high EPCF level the default portal style a single portal iView and the print option set to true you should see and use the print option.
    The option "Show print option" is not for every iView type avaible for example web dynpro iViews has that option this i know for sure, because i use this option with web dynpro iViews.
    Maybe you can build this function by your own i did this also with the following code. Maybe you can adapt that code:
    String p1 = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("PagePath");
    String p2 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-ext-sid");
    String p3 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-wd-cltwndid");
    String[] url = wdThis.wdGetAPI().getComponent().getApplication().getURLService().getGeneralService().getAbsoluteWebResourceURL(wdThis.wdGetAPI().getComponent().getDeployableObjectPart().getName()).split("/");
    parameter = p1 + "&iview_mode=default&sap-wd-renderMode=print&sap-wd-cltwndid=" + p4 + "&sap-wd-cltwndid-print=" + p4 + "&sap-wd-pb-ext-sid=" + p2 + "--" + p3 + "--&IviewPrint=true";
    String newUrl = "http://" + url[2]+ "/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy?iview_id=" + parameter;
    kind regards
    Fabian
    Edited by: Fabian Eidner on Mar 23, 2009 3:40 PM

  • Roles in SSAS

    Hi ,
    Doubt 1:
    I have one cube and no roles defined as of now. We got a situation to access the cube to only 10 users . I can see roles option in Cube and as well as I can see the same in SSMS. Which is the best option for creating roles and what is the difference
    Doubt 2 :
    Preapring ssrs , MDX report. Usually in sql SSRS report we prepare one query for splitting parameter values and after that we join using Join(abc,",") . How we do this in ssrs , MDX reports.
    Thanks in advance,
    Hari.

    Hi Roles in SSAS,
    Doubt 1:
    The best option to create roles is in the cube itself by the developer. This is because developers tend to change stuff from time to time. What developers than can do is send the role.file to the administrator and he simple has to add memberships
    only. 
    If a roles&members would be made by the administrator, and developers change the role afterwards administrators can than do everything from scratch again. There is of course a workaround where you can save the script once everything is setup, and than
    do manual changes in the script to the changes by the developer. If a lot has changed of course you have to do everything from scratch. 
    Doubt 2:  Srry i don't understand the question, can you rephrase or give example pls?

  • Two payers in single invoice

    Dear All,
    We got a requirement at the time of billing our client wants to debit two diffrent customer in a single billing document i.e. they wants two different payers in single invoice.
    Some amount will be debited to 1 payer and rest amount to the 2nd payer
    Is it possible in Standard SAP.
    thanks in advance
    ravi

    Hi Ravi
    At the time of billing , you cant have two different payers in Single invoice. , as Payer is one of the billing split parameter. So if you have two payers at order level also then billing split will happen and to meet your requirement , you need to go with the User Exit
    Regards
    Srinath

  • About work cener formulas

    Dear all,
       For one of our work center the process time for 1 to 25 pcs is same i.e.45 min. For every next one pc to 25 pcs it is again 45 mins, i.e. for first 25 pcs it is 45 mins and for next 25 pcs that is 26 to 50, it is 45 mins more. Hw to map this in formulas for work centers.
      Also what is number of split parameter in work center? Is that operation split? Hw is it effective in scheduling. Kindly describe with an example.

    While defining standard values in routing specify base quantity as 25 pc/ea/set as per  base unit of measure  and specify the formula in work center as follows
    Capacitities:
    Capacity category               001
         Setup formula               SAP005
         Processing formula          SAP006
    Incase you have labor involved for that work center ADD NEW Capacity category in work Center as 002
    Capacity category               002
         Teardown formula          SAP007
    And in scheduling definr formule as
    Setup formula               SAP001
         Processing formula          SAP002
    DO not specify teardown formula if this work center capacity category is machine (001)
    In costing view  Define COST CENTER and  Standard values  their activity types and formule
    NUMBER OF SPLITS IN ROUTING IS DEFINED IF IN WORK CENTER NO OF INDIV. CAP. IS SPECIFIED ( No Of Indv. Cap. = Number of Splits)
    pavan

  • Split Field and MultiValue parameter

    I have a multi-value parameter.  Options for example are: Zebra, Elephant, and Seal.  Then I have a table (actually a sharepoint list) which one field contains other animals in delimited fashion. For example: Elephant;Lion.
    What I have set up is a filter (on either the datasource or the tablix) of [Field] IN @parameter which works fine... as the field isn't also multi-valued.  I've tried using the Split function, but then it errors trying to evaluate the filter expression.
    What I want to do is to return the row if any selected parameter matches any value in the field.
    Does that make sense?  I'm trying not to get too wordy.  Thanks in advance for any responses.

    Hi There
    You might be able to do this by the help of some custom code so please do the following
    Create a custom function in your report which will convert your string to array as you know your fields contain string value you need to convert that in to array first so please go to your report properties
    and code and paste this function
    Public Shared Function ConvertStringtoArray(sourceString as String) As string()
    Dim arrayOfStrings() As String = sourceString.Split(",")
    return arrayOfStrings
    End Function
    Public Shared Function ConvertStringtoArray(sourceString as String) As string()
    Dim arrayOfStrings() As String = sourceString.Split(",")
    return arrayOfStrings
    End Function
    Now in you tablix filter please do the expression like this
    =instr(join(code.ConvertStringtoArray(Fields!Country.Value),","),join(Parameters!CountryPram.Value,","))
    =instr(join(code.ConvertStringtoArray(Fields!Country.Value),","),join(Parameters!CountryPram.Value,","))
    Where please change Parameters!CountryPram.Value to your parameter value and please change Fields!Country.Value to your sharepoint list fields values.
    I am assuming that you have used multivalued parameter
    I am putting some screenshot for your help
    If you have any question please let me know
    Many thanks
    Syed Qazafi Anjum

  • Always asks for Path[0] parameter: Split-Path -LiteralPath $variable -Leaf

    Good evening
    I have a very strange Problem: if I start this small script:
    $dir1="c:\test[1]\myfolder"
    $foldername = Split-Path -LiteralPath $dir1 -Resolve -Leaf
    Then powershell always asks:
    Cmdlet Split-Path at commandline Position 1
    Enter the value for the following parameter:
    Path[0]:
    What's wrong with my script? It should us $dir1 as Parameter for -LiteralPath
    Thanks a lot for any help,
    kind regards,
    Tom

    Thank you for your answer!,
    it's a Windows 2008R2 Server and Get-Host Returns Version : 2.0
    » -Leaf in V3 (and possible above) is in its own parameter set
    Outch...
    a more useful error message would be nice.
    So it is not possible to get the leaf from a path which contains Powershell Wildcards using 'prebuilt' Powershell commands? Such limitatations are very strange...
    Not in V2. You will either have to update to V3 or use the Regex approach that I showed in my previous post.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • How to split a varchar parameter say (2,4,7,24) and get each of the value

    Hi
    I have to create a function which takes in 2 paramters,
    first one is date
    second one is a list of codes within parentheses (varchar2) ex:- '(2,4,7,24)'
    Each of this number value brings out a table information such as
    table name
    where condition
    start and end dates and soon
    I need to build a dynamic SQL ..for each table information got from each value.
    In this case, their will be 4 select queries which needs to be joined.
    To start of, I want to know, how many codes have been passed in the second parm.
    Please let me know, if their is a function which contains the number of delimiters and a function which can be used to get each value
    basically from (2,4,7,24)
    I want
    the count of delimiters (here it is 3)
    using the count of delimiters (3+1 , will be giving me the count of numbers present)
    using the delimiter, I want to get each number
    ie.,
    2 first time and create the SQL
    4
    7
    24
    Atlast will join all 4 sql queries and create one which runs to produce my output
    Thank You
    I appreciate your help

    Sir,
    I did the same think, what you have posted, but I want some simpler way, and I dont know how to do it.
    create or replace
    PACKAGE BODY PKG_EXTRACT_FACILITY AS
    -- GET THE FACILITY INFO FOR A GIVEN YEAR .
    FUNCTION F_MAIN_FACILITY(PI_DATE DATE,PI_ORGEXT_ID varchar2) RETURN GC_RESULT_SET AS
    C_RESULT_SET GC_RESULT_SET;
    VN_TABLE VARCHAR2(20);
    VN_COLUMN VARCHAR2(40);
    VN_WHERE VARCHAR2(20);
    VD_START VARCHAR2(40);
    VD_END VARCHAR2(40);
    VN_MULTI NUMBER(2);
    VN_SQL VARCHAR2(4000);
    VC_QUERY VARCHAR2(2000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE(PI_ORGEXT_ID);
    DBMS_OUTPUT.PUT_LINE(''''|| PI_ORGEXT_ID ||'''');
    --VN_SQL := 'SELECT REPLACE(' PI_ORGEXT_ID ','"' ,'') FROM dual' ;
    --DBMS_OUTPUT.PUT_LINE(VN_SQL);
    --PI_ORGEXT_ID := EXECUTE IMMEDIATE(VN_SQL);
    OPEN C_RESULT_SET FOR
    --SELECT ORGEXT_TABLE,count(*), ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    -- FROM ORG_EXTRACT
    -- WHERE ORGEXT_ID IN
    -- (SELECT regexp_substr(''''|| PI_ORGEXT_ID ||'''','[^,]+', 1, level) from dual connect by regexp_substr(''''|| PI_ORGEXT_ID ||'''', '[^,]+', 1, level) is not null )
    -- group by ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI;
    --SELECT ORGEXT_ID,ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    -- FROM ORG_EXTRACT
    -- WHERE INSTR(''''|| PI_ORGEXT_ID ||'''',ORGEXT_ID) > 0 ORDER BY ORGEXT_ID;
    SELECT ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    FROM ORG_EXTRACT
    WHERE ORGEXT_ID IN
    (SELECT * FROM TABLE(in_list(PI_ORGEXT_ID)));
    -- DBMS_OUTPUT.PUT_LINE(VN_SQL);
    LOOP
    FETCH C_RESULT_SET INTO VN_TABLE, VN_COLUMN, VN_WHERE, VD_START, VD_END, VN_MULTI;
    EXIT WHEN C_RESULT_SET%NOTFOUND;
    -- dbms_output.put_line('record '|| VN_TABLE || ' ' || VN_COLUMN );
    IF ( VN_MULTI > 0 ) THEN
    IF ( VD_START IS NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITH XML FUNC NOT INCLUDING START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || '
    GROUP BY ORG_ID) Q1
    WHERE M.ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FIRST CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM rateprep.' || VN_TABLE || '
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SECOND CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES, BUT NOT INCLUDING WHERE CLAUSE.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || ' AND
    (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('THIRD CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES, AND INCLUDING WHERE CLAUSE.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FOURTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    END IF;
    ELSE
    IF ( VD_START IS NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITHOUT XML FUNC AND WITHOUT START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' ||VN_WHERE || '
    ) Q1
    WHERE M.ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FIFTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITHOUT XML FUNC AND WITHOUT WHERE CLAUSE AND START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SIXTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NOT NULL ) THEN
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || ' AND
    (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SEVENTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NULL ) THEN
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| '
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('EIGHTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    END IF;
    END IF;
    -- VC_SQL := 'SELECT ORG_MAIN.ORG_ID,' ||
    -- VC_EXT :=
    END LOOP;
    OPEN C_RESULT_SET FOR VC_QUERY;
    RETURN C_RESULT_SET;
    CLOSE C_RESULT_SET;
    END F_MAIN_FACILITY;
    FUNCTION in_list (p_in_list  IN  VARCHAR2) RETURN t_in_list_tab PIPELINED
    AS
    l_text  VARCHAR2(32767) := p_in_list || ',';
    l_idx   NUMBER;
    BEGIN
    LOOP
    l_idx := INSTR(l_text, ',');
    EXIT WHEN NVL(l_idx, 0) = 0;
    PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    l_text := SUBSTR(l_text, l_idx 1);+
    END LOOP;
    RETURN;
    END;
    END PKG_EXTRACT_FACILITY;
    SET SERVEROUTPUT ON;
    Declare
    VC_OUT NUMBER;
    VC_OUT1 VARCHAR2(80);
    VC_RES PKG_EXTRACT_FACILITY.GC_RESULT_SET;
    begin
    VC_RES := PKG_EXTRACT_FACILITY.F_MAIN_FACILITY('01-JAN-10','9,2,3');
    LOOP
    fetch VC_RES INTO VC_OUT,VC_OUT1;
    EXIT WHEN VC_RES%NOTFOUND;
    dbms_output.put_line('data ' || VC_OUT ||' ' || VC_OUT1 );
    END LOOP;
    close VC_RES;
    end;
    The function I wrote, right now is at building each Select query from each result record produced from passing the second parm to the select query to extract all other table information from
    ORG_EXTRACT table.
    Any help to solve the business role I wrote in my earlier mail, is appreciated.Thank You.
    Edited by: user8703472 on Sep 21, 2012 7:37 AM
    Edited by: user8703472 on Sep 21, 2012 7:40 AM
    Edited by: user8703472 on Sep 21, 2012 7:44 AM
    Edited by: user8703472 on Sep 21, 2012 7:44 AM
    Edited by: user8703472 on Sep 21, 2012 7:46 AM

  • Replacing NULL and EmptyString('') with "Unknown" in SSRS parameter dropdown

    All,
    What I want to do is, in the SSRS parameter drop down, instead of showing NULL and Blank values(), i want to categorize them as "Unknown", so, if the user selects "Unknown" from the SSRS drop down parameter, he should be able to see all
    the records that have NULL values or empty strings in that particular column in the result set.
    Can you tell me, how should I handle it in my main stored proc as well as in the dataset?
    Right now, i have something like this:
    Where
    (t1.name in (select value from dbo.Split(@TName,',')) OR @TName IN ('All'))
    -- Where t1.Name has empty strings and NULL values. Both of these values should be categorized under "Unknown"
    -- How would the dataset query look like? Right now I have this query for populating the drop down for that parameter:
    Select All
    UNION
    Select Distinct Name
    Order BY 1

    Hello,
    Please refer to the following stored procedure:
    SELECT
    CASE WHEN TName IS NULL OR TName = ''
    THEN 'Unknown' ELSE TName END AS TName
    From DemoTable
    Then, use following query code to get the parameter values:
    SELECT Distinct
    CASE WHEN TName IS NULL OR TName = '' THEN 'Unknown'
    ELSE TName END AS TName
    FROM DemoTable
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Problem with online split backup, database oracle

    Hello,
    we use for backup our SAP system online split backup, our database is almost 3TB big. Backup is functional but sometimes (4x-5x per month) backup fail with error bellow. If i understant this problem correctly brbackup lost connection to oracle after split disk system and cant stop backup mode in database and backup failed. How can i solve this problem? Exist some parameter for brbackup for reconnect to db when brbackup lost connection? Thanks for your help!
    BR0051I BRBACKUP 7.00 (25)
    BR0262I Enter database user name[/password]:
    BR0055I Start of database backup: bebnhrzd.anf 2009-09-22 14.52.25
    BR0484I BRBACKUP log file: /oracle/BP1/sapbackup/bebnhrzd.anf
    BR0351I Restoring /oracle/BP1/sapbackup/cntrlBP1.dbf
    BR0355I from /oracle/BP1/sapbackup/cntrlBP1.dbf ...
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.10
    BR0319I Control file copy created: /oracle/BP1/sapbackup/cntrlBP1.dbf 21676032
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.13
    BR0315I 'Alter database begin backup' successful
    BR0280I BRBACKUP time stamp: 2009-09-22 14.53.14
    BR0295I Splitting mirror disks...
    BR0280I BRBACKUP time stamp: 2009-09-22 16.07.43
    BR0296I Split of mirror disks successful
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3135 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03135: connection lost contact
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301E SQL error -3114 at location BrBackAlter-3, SQL statement:
    '/* BRBACKUP */ ALTER DATABASE END BACKUP'
    ORA-03114: not connected to ORACLE
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0318E 'Alter database end backup' failed
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0301W SQL error -3114 at location BrbDbLogClose-1, SQL statement:
    'UPDATE SAP_SDBAH SET RC = '0005', ENDE = '20090922161744', OBJ = ' ', LINE = '#  224     0     0     81358       7817759352        0                0  ALL          online_split    util_file        -
    7.00 (25)' WHERE BEG = '20090922145225' AND FUNCT = 'anf' AND SYSID = 'BP1''
    ORA-03114: not connected to ORACLE
    BR0326W Update of database log header failed
    BR0056I End of database backup: bebnhrzd.anf 2009-09-22 16.17.44
    BR0280I BRBACKUP time stamp: 2009-09-22 16.17.44
    BR0054I BRBACKUP terminated with errors
    Backup utility finished with returncode 5
    Backup FAILED

    Hello,
    in note 534729 is nothing about ORA-03135: connection lost contact only error ORA-03114 which refer to the note 335199 and in this note in nothing about ORA-03114 I want to say two things: this two oracle errors (ORA-03135 and ORA-03114) are not in alertSID.log on db server or in syslog on backup server. This error are only reported from brbackup which is running on backup server which is "client side". We don't have problem with connection from work processes on all instances to db server, we have only problem with brbackup which lost connection after split disk system. How i say this problem occurs only sometimes.  I was tested network connection from backup server to db server via niping a this is result:
    (root@hytti) #./niping -c -H kiuru -B 30000
    Sat Sep 26 14:10:58 2009
    connect to server o.k.
    send and receive 10 messages (len 30000)
    times -
    avg      7305 usecs
    max     46234 usecs
    min      2168 usecs
    bw    8020.50 kb/sec
    excluding max and min:
    av2      3081 usecs
    bw2  19013.91 kb/sec
    do you have any idea?? Thanks!

Maybe you are looking for