How to select a substring in oracle up to a more than one specific character

How to select a substring in oracle up to a more than one specific character
for ex : 121.051^NP: FAMILY PRACTICE  ( trim the values before ^ )
            121.051^*NP: FAMILY PRACTICE (trim the value before *).
with below function I can only get rid of ^ , I want both the specific characters ^ and ^* to be removed at the same time.   
SUBSTR(p.phys_sub_grp_2_desc,INSTR(p.phys_sub_grp_2_desc, '^') +1)

Another option is to boldly replace 'em:
SQL> with t as (
  2  select '121.051^NP: FAMILY PRACTICE' str from dual union
  3  select '121.051^*NP: FAMILY PRACTICE' from dual
  4  )
  5  --
  6  -- actuel query:
  7  --
  8  select substr( replace(str, '*')
  9               , instr(replace(str, '*'), '^')+1
10               ) str
11  from   t;
STR
NP: FAMILY PRACTICE
NP: FAMILY PRACTICE
2 rows selected.

Similar Messages

  • How to use my creative cloud account, downloading apps, to more than one computer, i.e. my desktop and laptop?

    How to use my creative cloud account, downloading apps, to more than one computer, i.e. my desktop and laptop?

    Just download the CC manager to the machines an sign in thru it.
    Creative Cloud Help / Install, update, or uninstall apps
    http://helpx.adobe.com/creative-cloud/help/install-apps.html
    Creative Cloud Learn & Support
    http://helpx.adobe.com/creative-cloud.html
    Creative Cloud / Common Questions
    http://helpx.adobe.com/creative-cloud/faq.html

  • Oracle OUTER JOIN on more than one table

    Hi!
    Friends, please help with this urgent problem: How can an outer join be written on more than one table?
    An SQL Server query:
    SELECT * from a INNER JOIN b on a.id = b.id LEFT OUTER JOIN c ON c.id = a.id AND c.id = b.id
    works fine with SQL SERVER
    But Oracle query:
    SELECT * from a,b,c WHERE a.id = b.id AND a.id = c.id (+) AND b.id = c.id (+)
    gives an error: OUTER JOIN cannot be used on more than one table? Why?
    I use OracleDriver from classes12.zip to connect to Oracle8i database.
    Please, help!

    The Oracle 8i and later SQL reference reads that the following "join_types" are supported and under this syntax it does not limit the LEFT OUTER JOIN (syntax the same as SQLServer example in original note) to two tables as implied in these notes:
    The join_type indicates the kind of join being performed:
    Specify INNER to indicate explicitly that an inner join is being performed. This is the default.
    Specify RIGHT to indicate a right outer join.
    Specify LEFT to indicate a left outer join.
    Specify FULL to indicate a full or two-sided outer join. In addition to the inner join, rows from both tables that have not been returned in the result of the inner join will be preserved and extended with nulls.
    You can specify the optional OUTER keyword following RIGHT, LEFT, or FULL to explicitly clarify that an outer join is being performed.

  • How can you create an activity as subsequent act. of more than one activity

    Hi.
    I want to create an activity as subsequent activity of more than one activity.
    I am using FM CRMXIF_ORDER_SAVE, but if I write data structure CRMXIF_DOC_FLOW with more than one item the system shows the error CRM_COPY 010 More than one predecessor was entered for data transfer.
    However I have customized multiple relationship allowed, and if I do multiples links in transaction crmd_order it works all right.
    Only it doesn't work with FM CRMXIF_ORDER_SAVE. I need create activities with FM because they are interface R/3. What FM can I use to create multiple subsequent activities?
    Thanks and best Regards
    Sorry for my english.

    Hi,
    I have got some activities creates in the system. (e.g. Act. 1, Act. 2, Act. 3 and Act. 4). With the FM CRMXIF_ORDER_SAVE  filled the structure CRMXIF_DOC_FLOW you can create subsequence activity of one of them (e.g. Act. X.1). I need create the same activity (Act X.1)  from another activity, (e.g. Act. 2). I know to do this in transaction CRMD_ORDER by link tab. But I don't know how to do this using FM or BADI or another thing.
    Act. 1     Act. 2      Act. 3     Act. 4 
    .....Act. X.1
    Thanks in advance.
    Edited by: Ana Isabel París on Jul 7, 2008 2:42 PM

  • How can i use the same front panel graph in more than one events in an event structure?

    i want to display the signals from my sensorDAQ in a graph.but i have more than one event in the event structure to acquire the signal and display it in the graph.the first event is to acquire the threshold signals and its displayed in the graph as a feedback.after the first event is executed, i will call the second event,where the further signals are acuired and compared with the threshold signals from the event 1.my question is how can i use the same front panel control in more than two events in the event structure?please answer me i'm stuck.
    Solved!
    Go to Solution.

    Hi,
    I have attached here an example of doing the same using shift registers and local variables. Take a look. Shift register is always a better option than local variables.
    Regards,
    Nitzz
    (Give kudos to good answers, Mark it as a solution if your problem is Solved) 
    Attachments:
    Graph and shift registers.vi ‏12 KB
    graph and local variables.vi ‏12 KB

  • HT201365 How do I change name of phone if I have more than one iPhone?

    How to change iPhone name for find iPhone where I have more than one iPhone?

    Settings > General > About > Name: Change the name.

  • How to set the Certifcate to use for SSL when more than one available?

    I apologise for bad wording of question.
    We have a 11g Directory Server and when we created the directory instance it generated a self-signed certificate. very nice.
    We have recently requested and installed a CA signed certifcate, so we now have TWO certificates in the directory certificate store. Default Certificate and the new Server-Cert (the CA signed one)
    LDAP clients STILL seem to be presented with the self-sgned certificate though.
    Simple question... how do I make my Server-Cert the 'default' certificate presented to LDAP clients ???
    I would rather not delete the self-signed cert if possible.
    I cant find any documented method to achieve this.

    # Listing Certificate
    $ /certutil -L -d <path>/slapd-abc/alias -P slapd-
    # Add Trust by adding CT
    $ certutil -M -n "GeoTrust DV SSL CA" -t CT,, -d <path>/slapd-abc/alias -P slapd-
    # Verify the setup.
    $ certutil -L -d <path>/slapd-abc/alias -P slapd-
    ( You should see the CT beside the relevant cerficate, making it default for SSL communication )
    GeoTrust DV SSL CA CT,,
    Link : http://docs.oracle.com/cd/E19656-01/821-1504/6nmg10b6g/index.html ( Look around for different steps for configuring SSL )
    JPrince

  • Selecting from a view when tables are in more than one schema problem

    I give up where am I missing it. Why is the ORA-01031 error being generated on the view u1.bv1. In testing even if I give object access to u3 I still get the same errors:
    SQL>
    SQL> drop user u1 cascade;
    drop user u1 cascade
    ERROR at line 1:
    ORA-01918: user 'U1' does not exist
    SQL> drop user u2 cascade;
    drop user u2 cascade
    ERROR at line 1:
    ORA-01918: user 'U2' does not exist
    SQL> drop user u3 cascade;
    drop user u3 cascade
    ERROR at line 1:
    ORA-01918: user 'U3' does not exist
    SQL> drop role aRole;
    drop role aRole
    ERROR at line 1:
    ORA-01919: role 'AROLE' does not exist
    SQL>
    SQL>
    SQL> select user from dual;
    USER
    SYS
    1 row selected.
    SQL>
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    5 rows selected.
    SQL>
    SQL> create user u1 identified by u1 default tablespace users
    2 quota unlimited on users;
    User created.
    SQL>
    SQL> create user u2 identified by u2 default tablespace users
    2 quota unlimited on users;
    User created.
    SQL>
    SQL> create role aRole;
    Role created.
    SQL>
    SQL> create user u3 identified by u3 default tablespace users;
    User created.
    SQL>
    SQL> grant aRole to u3;
    Grant succeeded.
    SQL>
    SQL> alter user u3 default role all;
    User altered.
    SQL>
    SQL> grant create session to u3;
    Grant succeeded.
    SQL>
    SQL> create table u1.t1(c1 number);
    Table created.
    SQL>
    SQL> create table u2.t1(c1 number);
    Table created.
    SQL>
    SQL> grant select on u2.t1 to u1;
    Grant succeeded.
    SQL>
    SQL> create or replace view u1.bv1 as
    2 select u1.t1.c1 as c1 ,u2.t1.c1 as c2
    3 from u1.t1, u2.t1 where u1.t1.c1 = u2.t1.c1;
    View created.
    SQL>
    SQL> grant select on u1.bv1 to aRole;
    Grant succeeded.
    SQL>
    SQL> create or replace view u1.gv1 as select * from u1.t1;
    View created.
    SQL>
    SQL> grant select on u1.gv1 to aRole;
    Grant succeeded.
    SQL>
    SQL> connect u3/u3
    Connected.
    SQL>
    SQL> select * from u1.bv1;
    select * from u1.bv1
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL>
    SQL> select * from u1.gv1;
    no rows selected
    SQL>
    SQL> spool off

    User u1 cannot do a grant on a view to other user if the view uses tables from other schemas unless you do a "with grant option" grant.
    You need to do the following to make it work:
    SQL> grant select on u2.t1 to u1 with grant option;
    Grant succeeded.
    SQL>

  • How do I use switch and case statements to fill more than one other field?

    Hi all,
    I'm new to the community.
    I'm trying to make an existing form more user friendly for my coworkers. I want to use a switch and case approach in a drop-down list field so that the selection fills two seperate other fields with different info related to the selection.
    I can already do this with one field, but if I add a second target field under an existing case the text doesn't appear there when I make the selection from the dropdown.
    Basically, I'm asking if I can do this:
    switch 
    (sNewSel){
       case "1": // Selection 1    Row2.Field1
    = "text for field 1";
        Row1.Field2 = "text for field 2"; 
        break;
    etc.
    It works if the "row1.field2" option isn't there, but not when it is present.
    Any takers?

    I'm not sure if I will be able to send you the form. There may be too much to redact.
    Would this last bit of code in the cell affect anything?
    if 
    (bEnableTextField)
    {Row2.Field1.access
    = "open"; // enable field
    Row2.Field1.caption.font.fill.color.value= "0,0,0"; // set caption to black
    That is, do I also need to repeat the same thing for the second target cell (Row1.Field2)?
    What would be possible hang ups that would prevent it from working correctly?
    Dave
    By the way, I'm not sure if my other attachment posted. I am trying again.

  • How do I create forms that people can complete in more than one sitting i.e. save and submit?

    Hi,
    I have just bought formscentral and need advice to achieve my objectives:
    Required:
    Customer can part fill form, save and complete later on and submit for us to capture the data.
    Customer can save or can access their completed form, as we need them to print it out, and physically sign a version for us for legal reasons
    Several different people within the customer's business need to fill out different areas of the form, so they may need to e-mail the form bwtween each other or each logon and complete their section.
    Are the above achievable? If so can I do as a web form or pdf? Are there any settings I need to apply to the form before or during creation? Are there only certain methods of distribution that will work?
    Other concerns:
    Our end customers are small traders that are not that computer literate and I worry that they won't have the latest adobe reader or the form won't be compatible with their Mac or firewalls etc and will struggle to be able to fill out, save and submit the forms for technical reasons. Are these concerns justified? If so, are there ways to minimise these issues?
    Any guidance is much appreciated. The package also mentions it includes one to one support from Adobe - how do I access this support?
    Thank you,
    Rob

    If a requirement is that the form be passed around to several users, I think that the PDF option is your only hope. It will indeed be a problem if users don't have Reader or some other forms-capable PDF viewer. You don't have to do anything special apart from enabling it with FormsCentral. This allows users with Reader versions prior to 11 to save the filled-in form. You'll just have to try to educate the users to use Reader (and NOT to use Preview on a Mac).

  • How do I use mobile link to view documents on more than one device?

    I have documents on my iPhone and want to send them to my iPad using Mobile Link. How do I do this?

    Hi bephys,
    For this you can simply upload the doc to files.acrobat.com and send the link to the recipient via Adobe Send.
    Anyone having the link would be able to access the doc.
    Alternatives would be Google Drive or One Drive.
    These links might be helpful to you:
    https://support.google.com/drive/answer/2498081?hl=en
    http://windows.microsoft.com/en-in/onedrive/ios-faq
    Regards,
    Rave

  • How to repeat a row when tablix columns print over more than one page

    I have a tablix with 20 Columns.  When this prints it prints over 3 pages (which is
    OK).   The first Column is the Name (in this case it is the
    Project name).  On Page 2 & 3 I want to print the Project name again,
    so that a report user does not need to go back to page one to figure out which
    project the columns are referring two.  In Excel there is an option
    "Rows To Repeat".  I am trying to do the same in SSRS
    2012. 
    I have tried links
    like:
    http://msdn.microsoft.com/en-us/library/dd207045.aspx
    http://remicaron.wordpress.com/2010/01/05/how-to-get-ssrs-to-repeat-the-row-headers-tablix-2008/
    http://www.sqlcircuit.com/2012/03/ssrs-how-to-repeat-column-header-in.html
    These do not work
    for me .... in fact they return an error msg
    Can this be done?
    Tx
    Andrew
    Andrew Payze

    Hi Andrew,
    If I understand correctly, there are 20 columns in the table. When it prints over 3 pages, the report should repeat the first column in all pages.
    To freeze row header in the table, we can refer to the following steps:
    The table should have a group. If the Name is already a row group, we can directly refer to step 2. Or we need add a row group grouped by Name ahead.
    Right-click the table to open the Tablix Properties dialog box, then enable “Repeat header rows on each page” and “Keep header visible while scrolling” options under Row Headers category.
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How to allow input text field to accept more than one "specific" answer.

    Hi,
    I am working for something and trying to create a type-box-based quiz for one of my classes, where an input text field can change it's border color if 2 or more words from an accepted word list is inputed.
    For example, Say a list has possible answers: R,G, B, Y for the question "Name 2 colors".
    I want to create an input text box where the border of the box will change color if any 2 letters (in the above list) are entered into it.
    I've tried setting up a variable NumberSuccesses and setting it so that the number increases by 1 for each letter entered e.g.
    if (Ex.text == "R");
    NumSuc = NumSuc +1; // the var NumSuc has already been defined earlier in the code
    If (Ex.text ''G")
    NumSuc = NumSuc + 1
    if (NumSuc == 2)
    Ex.borderColor = 0x0000FF
    but that didn't work.. and I tried doing it with another function which I use for multiple input boxes like if there were boxes A, B, C. I could set up a general function where if the correct answers were entered into A, B, an C respectively, only then will say, a checkmark show up using a
    EnableCheckmark (); type function. Not sure how to do it if it's the same text input box though. Also just tried adding it into the same function re.
    If (Ex.text == "R" + "G")
    Ex.borderColor = 0x0000FF
    .. Does anyone know what else I can do?

    The solution of Nishu with Evaluation Logic:
    //These Are the Possible Answers
    var solutions:Array = new Array("A","B","C","D");
    function testInput(_inputText:String):Boolean
        //the delimiter could also be a comma, here it is a space
        var inputStringArray:Array = _inputText.split(" ");
        var counter:Number = 0;
        for (var i:int=0; i<inputStringArray.length; i++)
            for (var j:int=0; j<solutions.length; j++)
                if (inputStringArray[i]== solutions[j])
                    counter++;
        if (counter >=2)
            trace("true");
            return true;
        else
            trace("false");
            return false;
    //Textfield with name input_txt on stage
    input_txt.addEventListener(TextEvent.TEXT_INPUT, answerTxtInp);
    // The function that will be called by the event listener
    function answerTxtInp(txtEvent:TextEvent):void
         // depending on the possible answers of characters, change the border  color
         if(testInput(input_txt.text)){
             input_txt.borderColor = 0xFF0000;
         else{
             input_txt.borderColor = 0x000000;

  • How can I scan to more than one specific folder?

    For example, I want to scan in a document from the printer but want it to go into folder A. Next I want to scan another document but I want it to go into folder B. I know how to create a permanent destination for my scans, what I want to know is, is there a way to get the document to save to a folder if it is open an active let say (if the desktop is active it saves to the desktop or if my document folder is open and active it saves to the document folder). Thank you very much!
    This question was solved.
    View Solution.

    Welcome to the forums MFSOUTH,
    I saw your post about wanting to change where your scans are directed to. My suggestion would be to change the scan destination through the printer software when you make a scan and want it saved to a certain folder (Folder A or B). You won't be able to send a scan from the printer and have it save to multiple folders.
    If there is other inquiries you have, please feel free to ask!
    Also, include which printer model you have:
    How Do I Find My Model Number?
    Happy Friday
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • How can I define more than one termination character for RS-232 interface communication?

    Hi,
    I have to communicate through the PC's RS-232 interface with a microprocessor board. I am using the "Advanced Serial Write and Read.vi" out of the LabVIEW examples and it works on principle.
    My problem is the termination character: It looks like I just can set one termination character, EITHER 0xA (so LF / newline) OR 0xD (CR / carriage return), but I have the need to react on various termination characters like "<CR> <LF> <CR> <LF> OK <CR> <LF>" or "<CR> <LF> <LF>"; which I would like to set in a control (this VI will be used in a TestStand sequence).
    Is there a way to do that, so that I can set wichever termination character(s) I need? The property node in "VISA configure serial port" just accepts an unsigned integer, nothing else. Sure I can get it running with the timeout - but this is not very nice and extends testing time unnecessarily.
    Thanks & Regards!
    Regards,
    gedi
    Solved!
    Go to Solution.

    That would be for the write. The poster is asking about the read. For the read you will need to write your own read routine. You will basically need to use a loop and inside the loop use the VISA Bytes at Serial Port to see if there's any bytes available. Read that many bytes, and append them to a string that you build up in a shift register. After concatenation check to see if you've got the termination characters. If so, the read is done. Fairly simple. Be sure to turn off the termination character enable in the VISA Configure.

Maybe you are looking for

  • Using "today" when making an iCal appointment in Day view gets it wrong.

    When I view iCal in Day view and click on the '+' to make a new appointment, it doesn't get "today" correct. For example, assume it's November 16 and I'm viewing November 20 in Day view. If I click the '+' and then type "Run at 12:30 today" and appoi

  • DC is not shifting to ADC when DC out of network

    we have 2 DC's in our premises, when 1 DC is down another was not playing a role of DC, replication is ok i checked, DNS is working fine. Kindly help. 

  • How to build a part-hierarchy ?

    Hi specialists, I fear the topic is not very descriptive. Here's my scenario and problem:   A hierarchy (customers) is loaded from the R/3-system to the business warehouse.   Unfortunately the Customers don't start on Level 1 of that hierachy - but o

  • Mail files in Mail  1.3.11 vs Mail 2.1.2?

    I recently attempted to import my Mail info from my primary computer running 10.4.11 with Mail 2.1.2 into a computer I plan to use for backup use that is running 10.3.9 and Mail 1.3.11 I used a post I found here in the Discussions on 'Moving Folders

  • Customer Printing Forms

    Hello - I am using the registration form for customers to register in a warranty program. I would like them to be able to print out the form for their own records and for sending in with a warranty claim. How do I make this happen? I don't see any op