Instring in OBIEE

Hi All,
I need to decode(sub string(field,instr(field).....
is there any equivalent function in OBIEE
Regards,
Guru

That works for only for 2nd kind values but how about 1 and 3 as in below?
as per your logic ie left(right(fieldname,4),2)
1. aus_uk_com-->returns _c whereas you want as co
2.news_san_fran-->returns fr whereas you want as fr
3.ak_mike_fe-->returns e_ whereas you want as fe

Similar Messages

  • Urgent - INSTR() Functions in OBIEE?

    Hi All,
    I just got some very good help from the DB experts on these forums about solving a problem with a table join that I had.
    But now I have this SQL query and I'm trying to figure out how to implement this in OBIEE:
    select *
    from TABLE1,TABLE2
    where instr(TABLE2.USER_ID,TABLE1.USER_ID) > 0
    My question is how do I implement this instr() function on OBIEE? I checked physical and business model mapping layers in the repository and it does not allow me to configure this type of join. Is it possible to configure this type of join function to be invoked automatically everytime a user runs a certain query in OBIEE (as if it was a natural join)?
    Any help would be greatly appreciated.
    Alan

    Hi,
    You can refer the below links,
    Substring instr issue in obiee
    extract a string from a string
    http://108obiee.blogspot.in/2009_10_01_archive.html
    Award points it is useful.
    Thanks,
    satya

  • Substring instr issue in obiee

    Hi,
    I want to use the INSTR function in OBIEE
    POSITION function found in the forum
    INSTR function takes four values:
    INSTR (string1, string2, number, number)
    Eg IP address
    111.222.333.444
    The desired result
    SUBSTR (IP_ADD, 1, INSTR (IP_ADD, '.', 1,3) -1)
    111.222.333
    POSITION function, how should I use?
    Thanks,
    Mino

    1st example '0.0.0.0' will def be a problem here. Unfortunately, I don't think any other OBIEE string function could support this.
    I was assuming for min 2 numbers like 00.00.00.00. Do you have any case like the first one in your table ?
    =========
    As I said, you can't use POSITION function here..Just do help for String Function in RPD)
    Position
    Returns the numerical position of the character_expression1 in a character expression. If the character_expression1 is not found, the function returns 0.
    Syntax:
    POSITION(character_expression1 IN character_expression2)
    where:
    character_expression1
    Any expression that evaluates to a character string. Used to search in the second string.
    character_expression2
    Any expression that evaluates to a character string.
    So, these are the 2 expression, In your case its '.' & IP_ADDR.
    =========
    Hope its helpful

  • INSTR functionality in OBIEE

    Hi All,
    I have a requirement like i have to display some parts of a string in the request.
    Can any one help me how can i achieve this.
    Ex: A/P Clerk.FIN.IN.7050.US1000
    I have to display IN , for each record the position of IN Segment changes
    How can i achieve this in Answers.
    Thanks in Advance
    Regards,
    Vishwanath

    Hi Vishwanath,
    In theory the function LocateN should make it. However I am trying to test it and it's not working in my local OBI installation. If this is an issue with this function, you can also simulate it by using a combination of Locate and Substring although it's not ideal.
    My recommendation is that you split the string in the RPD instead of doing it in Answers, as probably you will need this to be done in multiple requests and you want it to be available to the rest of the user community.
    Please don't hesitate to contact me for further clarification.
    Best regards,
    Alex

  • How to use Table valued MSSQL  function in OBIEE

    Hi all,
    Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
    I know for MSSQL Stored Procedure we can write as
    EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
    but now I have a table valued function in the query window I can get the data as
    select * from myfunction(parametervalue)
    In physical layer of OBIEE I have tried as
    select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
    Can some one help me to solve this.
    Thanks,
    Mithun

    Follow this link and try yourself. let me know for issues
    Substring instr issue in obiee
    Appreciate if you mark
    Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM

  • Extract list of users in OBIEE 11g

    Can someone please tell me what is the way to extract the list of users using OBIEE 11g with their roles and permissions.
    Thanks in advance.

    Check this script
    '1: Make an UDML export of the RPD using nqgenudml.exe
    '2: Change the filename/location in this script
    '3: Run the script from the command line cscript Read_Usergroups.VBS > users.txt
    '4: Put the export in a XLS Pivot table
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'point this to your UDML EXPORT
    Set objFile = objFSO.OpenTextFile("E:\usergroup.txt", ForReading)
    Const ForReading = 1
    Dim arrFileLines()
    dim strRLine
    dim strTemp1
    dim strTemp2
    dim strTemp3
    dim intRoles
    intRoles = 0
    i = 0
    WScript.Echo "USER_NAME;FULL_NAME;ROLE;COUNT"
    Do Until objFile.AtEndOfStream
    strRline = objFile.ReadLine
    if left(strRline,12) = "DECLARE USER" then Redim Preserve arrFileLines(i)
    strTemp1 = MID(strRLine ,15 , 50)
    strTemp1 = MID(strTemp1 ,1 , instr(strTemp1, """")-1)
    IF instr(strRline,"}" ) >0 THEN
    strTemp2 = MID(strRLine , instr(strRline,"{")+ 1, (instr(strRline,"}") - (instr(strRline,"{")+ 1)))
    ELSE
    strTemp2 = ""
    END IF
    arrFileLines(i) = strTemp1 &";" & strtemp2
    intRoles = 1
    i = i + 1
    end if
    if intRoles >= 1 then
    if instr(strRline,"HAS ROLES (" ) >0 then
    intRoles =2
    end if
    if intRoles =2 and instr(strRline,"HAS ROLES (" ) =0 then
    strTemp3 = MID(strRline,instr(strRline, """")+1,50)
    strTemp3 = MID(strTemp3,1,instr(strTemp3, """")-1)
    WScript.Echo arrFileLines(i-1) &";" & strTemp3 &";1"
    end if
    if intRoles =2 and instr(strRline,")" ) >0 then intRoles = 0
    end if
    end ifLoop
    objFile.Close
    Source : Srinivasan Software Solutions Pvt.Ltd.: [OBIEE 11g] OBIEE Get All Users And Roles From RPD

  • How to use SQL Query in OBIEE Reports

    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advance

    796797 wrote:
    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advanceArrggh. I wish people wouldn't just answer a question without taking the time to actually think about what the user is asking for and if it makes sense. I like Diney's response best: Why not use the Title View? (i.e., asking questions until it is clear what is needed.) So along those lines, why are you trying to put the name of your report in a column of your report?? And why do you need to use direct sql to do this??
    Kindly or not, urgent or not, state what you are trying to achieve and why you need it (if the obvious answer like "using the Title View" doesn't work for you), instead of simply assuming your method is right and you need to know how to do what envision. Your method may not be correct or necessary.

  • OBIEE only getting limited number of group membership records

    Hey everyone,
    I'm seeing some strange behavior with the group membership functionality of OBIEE. Right now we're on version 10.1.3.2 and we've implemented SSO and we setup a query against LDAP (AD) to get user group information similar to the way Venkat's blog demonstrates:
    http://oraclebizint.wordpress.com/2007/10/12/oracle-bi-ee-101332-and-oid-user-and-group-phase-2/
    At first glance, everything was working smoothly, however, on second glance, I noticed that on users who were part of lots of groups (i.e. 80 groups), not all of their membership information was getting into OBIEE. On my test user, who was part of only 10 groups, I ran a test in which I only gave access to the Answers module to a person from the 10th group. When I logged into OBIEE as my test user, I was able to access answers.
    On my second test user, who had 80 groups, I set access to answers for the 75th and 80th groups (both different tests). Neither test allowed this user to access answers. However, when I choose the 5th group returned, the user was quickly able to see and access answers.
    When I test out the call to the Oracle function in the Admin tool, I see all the groups returned there.
    These strange results lead me to believe that there is only so many group membership records that OBIEE can receive. Is that true? Has anyone seen this before? Did I forget to set something appropriately?
    Thanks everyone for your help!
    -Joe

    Hey,
    Sorry about the delay in getting back to you, I was slammed with some work right before the Holiday. Anyway, below is the sample code and an example of it's usage. be sure to replace the <BASE DN>, <LDAP HOST>. <LDAP USER>, and <LDAP PASSWORD> with the appropriate values for your situation.
    Also, you'll need to create the "ARRAY" datatype like in Venkat's blog.
    Best of luck!
    -Joe
    select * from table(getusergroup(‘Jbertram’));
    create or replace FUNCTION GETUSERGROUP(Username in Varchar2) RETURN ARRAY PIPELINED AS
    -- Adjust as necessary.
    l_retval pls_integer;
    l_session dbms_ldap.session;
    l_attrs dbms_ldap.string_collection;
    l_message dbms_ldap.message;
    l_entry dbms_ldap.message;
    l_attr_name varchar2(256);
    l_ber_element dbms_ldap.ber_element;
    l_vals dbms_ldap.string_collection;
    l_raw dbms_ldap.binval_collection;
    l_ldap_base varchar2(256) := '<BASE DN>';
    l_filter varchar2(100) := '(&(cn='||Username||'))';
    l_ldap_host varchar2(100) := '<LDAP HOST>';
    l_ldap_port number := 389;
    l_ldap_user varchar2(100) := '<LDAP USER>';
    l_ldap_passwd varchar2(100):= '<LDAP PASSWORD>';
    l_result varchar2(100);
    begin
    -- Choose to raise exceptions.
    dbms_ldap.use_exception := true;
    dbms_ldap.utf8_conversion := false;
    -- Connect to the LDAP server.
    l_session := dbms_ldap.init(hostname => l_ldap_host, portnum => l_ldap_port);
    l_retval := dbms_ldap.simple_bind_s(ld => l_session, dn => l_ldap_user, passwd => l_ldap_passwd);
    -- Get all attributes
    l_attrs(1) := 'memberOf'; -- retrieve all attributes
    --l_attrs(2) := 'cn';
    l_retval := dbms_ldap.search_s(ld => l_session
    ,base => l_ldap_base
    ,scope => dbms_ldap.scope_subtree
    ,filter => l_filter
    ,attrs => l_attrs
    ,attronly => 0
    ,res => l_message);
    if dbms_ldap.count_entries(ld => l_session, msg => l_message) > 0
    then
    -- Get all the entries returned by our search.
    l_entry := dbms_ldap.first_entry(ld => l_session, msg => l_message);
    <<entry_loop>>
    while l_entry is not null
    loop
    -- Get all the attributes for this entry.
    dbms_output.put_line('---------------------------------------');
    l_attr_name := dbms_ldap.first_attribute(ld => l_session
    ,ldapentry => l_entry
    ,ber_elem => l_ber_element);
    <<attributes_loop>>
    while l_attr_name is not null
    loop
    -- Get all the values for this attribute.
    l_vals := dbms_ldap.get_values(ld => l_session, ldapentry => l_entry, attr => l_attr_name);
    <<values_loop>>
    for i in l_vals.first .. l_vals.last
    loop
    dbms_output.put_line(substr(l_vals(i),4,instr(l_vals(i),',')-4));
    PIPE ROW(substr(l_vals(i),4,instr(l_vals(i),',')-4));
    end loop values_loop;
    l_attr_name := dbms_ldap.next_attribute(ld => l_session
    ,ldapentry => l_entry
    ,ber_elem => l_ber_element);
    end loop attibutes_loop;
    l_entry := dbms_ldap.next_entry(ld => l_session, msg => l_entry);
    end loop entry_loop;
    end if;
    -- Disconnect from the LDAP server.
    l_retval := dbms_ldap.unbind_s(ld => l_session);
    --dbms_output.put_line('L_RETVAL: ' || l_retval);
    end;

  • Using Sql Queries in OBIEE Reports

    Hi all,
    I need to use direct sql query in report function column.. How can I implement that.
    For example
    Our report name is /shared/Automotive/Vehicle Services/Most Serviced Vehicle Models
    we have to eliminate /shared/Automotive/Vehicle Services/ part from above report name.. I have done this in sql using the Query SUBSTR(COL,INSTR(COL,'/',1,4)+1).
    So kindly help how to implement above sql query in Obiee.. Urgent.
    Thanx in advance

    If "Report Name" is a column then you can simply create a custom formual and apply the substring logic to it to get at the single report name instead of the full path.
    Otherwise this logic can easily be accomplished within the RPD via a logic column expression.

  • Error while running a KPI Watchlist in obiee 11g dashboard

    I am getting the following error while running a KPI Watchlist :
    *" Odbc driver returned an error (SQLExecDirectW) "*
    I added two KPI's (KPI 1 & KPI 2)into that Watchlist , one from the default "Sample Sales Lite" (sub 1) and another from sub 2 which have essbase as data source .
    KPI 1 (created from sub 1) is working fine , but while placing KPI 2 (created from sub 2 ) in the watchlist , its throwing the above error . However , while running KPI 2 individually , its showing meaningful results .
    Let me know if the problem statement is not clear .
    OBIEE version used : 11.1.1.5.0 .

    Could anyone reply this thread. I am also getting the same error . Even server logs are also not helping.

  • OBIEE 11g - without going to Sawbridge first.....

    If you called OBIEE via the default path: http://domain-name/analytics?NQuser=xxx&NQpassword=xxxx
    instead of
    http://domain-name/analytics/saw.dll?NQzuser=xxx&NQpassword=xxxx  
    would your credentials be checked by weblogic before the default login jsp has access to the request parameters or after?
    Or does weblogic/OBIEE  stop you passing parameters to the default URL?
    What I'm trying to say is, if you go via the default domain without calling saw.dll first can you pass an encrypted password to your bespoke login.jsp (default.jsp) within the analytics domain and get this default.jsp
    to convert the password to plain text and then this default.jsp calls (forwards) to saw.dll....

    I have been trying to log in with my YouTube account name and password like usual. I just tried using my gmail log in and it works. Did they merge or something? It was working yesterday just fine without me changing the way I logged in. Either way, thanks for the help! Works great now
    Message was edited by: EvoXFTW

  • Error while creating Bi presentation service in obiee(11.1.1.3)

    Hi,
    Im using Jdeveloper(11.1.1.5) and OBIEE(11.1.1.3)
    I created a ADF application in Jdev and when I try to create a BI presentation services I'm getting the following error message.
    *Connection attempt failed.*
    *java.lang.RuntimeException: Unable to retrieve logon token. This version requires a BI build that implements the version 7 SOAP interface. Please verify that you are using the correct BI version.*
    does the creation of presentation service in jdev(11.1.15) work only with OBIEE(11.1.1.5) and not OBIEE(11.1.1.3).
    please help!
    Thanks,
    Venky
    Edited by: Venky on Jul 26, 2011 2:02 PM
    Edited by: Venky on Jul 27, 2011 6:18 AM

    Venky,
    The SOAP interface released with OBIEE 11.1.1.3 is version 6 (v6) as you can see from its WSDL URL.
    This would leave one only to believe that the SOAP interface released with OBIEE 11.1.1.5 is version 7.

  • OBIEE error while scheduling the report.

    Hi,
    I scheduled one report in OBIEE tool for 8.30 pm but that report get failed.
    I executed the same report many times with the same database configuration, same FTP configuration,
    I never get such exception before.
    In the morning i again execute that report with same configuration and it works.
    I am unable to find the cause of the error.
    bellow is the error description.
    oracle.apps.xdo.servlet.scheduler.ProcessingException: java.sql.SQLException: ORA-01033: ORACLE initialization or shutdown in progress
    could any body please explain what is the exact cause of the issue.

    The oracle Db you are connected is being shut-down.

  • How to embed user credentials in Secured Web Service from OBIEE 11gFMW?

    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. According to the documentation in the Integrators guide, FMW Security guide, and Web Logic guides..seems we have to configure the SOAP call to have the proper credentials. The documentation is not very clear on exactly how to do this. I tried to set up the credential store and an account in ActionFrameWorkConfig.xml but I am still missing something. I am logged into OBIEE as biadmin and I am trying to call a webservie in EBS that is granted to SYSADMIN/sysadmin user. Pls advise.

    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. According to the documentation in the Integrators guide, FMW Security guide, and Web Logic guides..seems we have to configure the SOAP call to have the proper credentials. The documentation is not very clear on exactly how to do this. I tried to set up the credential store and an account in ActionFrameWorkConfig.xml but I am still missing something. I am logged into OBIEE as biadmin and I am trying to call a webservie in EBS that is granted to SYSADMIN/sysadmin user. Pls advise.

  • Date Variable in Obiee 11g

    Hi All,
    I have created a dynamic repository variable that gives the current date. The date is given in the following format 'MM/DD/YYYY'. This is format that I want the date to appear in. In the presentation catalog, I have created a presentation variable dashboard promt called StartDate, that defaults to the repository variable CurrentDate. I have also created a report that has a number of measures filtered in different ways. If we take one of the measures in the report, what I have done is edited the formula to filter the measure by reported_date>Date'@{StartDate}'.
    Now when I got and see my dashboard I get an error, 'Datetime value 06/07/2011 from 06/07/2011 does not match the specified format'. However when I click 'Apply' on the prompt, the error does not appear and it just says that there is no data for this report.
    Can someone please help me solve this problem?
    Thanks,
    Nikita

    I solved this issue by using steps listed here http://gerardnico.com/wiki/dat/obiee/cast_as_date.
    Thanks

Maybe you are looking for

  • Html template for email

    I have just started my trial with DreamWeaver. I'm curious will dream weaver allow me to create and design and email that I can insert into my email system using the HTML?  If so, what is the easiest way to do this?

  • Diffrence between Oracle BI Publisher and OBIEE

    Now iam using SQL Server Reporting Services (SSRS). I want to migrate SSRS to Oracle Reports. I want to know the diffrence between Oracle BI Publisher and Oracle Business Intellingence Enterprise Edition (OBIEE). Which one is the best tool to generat

  • 'Z_PRINT_HELP_SERVICE_ALL_DP', used web printing- in what TCode can find?

    Hello, In SAP Bw 3.0B, we implemented the display of multiple web items data onto Excel after going thru the document, "Web Printing to Excel'. While doing it we make use of the HELP_SERVICE='Z_PRINT_HELP_SERVICE_ALL_DP' . Now as we are migrating in

  • Tiff size from Illustrator CC

    Yesterday we moved from CS6 to CC. Illustrator files that we previously saved out as tiffs from CS6 are now coming out much larger from CC. i.e. tiff was 1mb from CS6 now 18mb from CC. We have checked settings: colour space, dpi and lzw compression a

  • Extract Audio is grayed out

    Hey guys, I searched for a solution but haven't found one. Hopefully somebody knows what's going on. I took the selection tool and selected my video/audio1 clips (two short ones) Went to Clip, Audio and then Extract Audio was grayed out. Audio Grain