Variable Field Divider in a VARCHAR2 column

I need to extract part of a value in a VARCHAR2(50 BYTE). The data layout is like this FIELD1/FIELD2. The position of the field divider is not always the same on all records, but the divider character is always the same. How would you suggest I can accomplish this? I only need the value in FIELD1.
Thank you in advance,
JB

Final statement... just as FYI
select substr(USER_MEMBER_NOTE1,0,((instr(USER_MEMBER_NOTE1,'/')-1)))

Similar Messages

  • Formatted Search Query for Variable field

    Hi Experts,
    I have a client who wants a UDF on the Delivery Document to auto populate wiht a Variable field in the Administration module. This variable field was added by a Add-on.
    The system information is:
    Form: ShipOpt
    Item: Boxes
    Pane: 1
    Column: Box Name
    Row: 0
    Variable: 3
    How do you specify a Variable field in the Query?
    Any help would be appreciated.
    Thanks,
    Marli

    Hi Marli,
    You may only use Current form variable for FMS query.  I believe you need UDF on the Delivery. SO the other form will not be available to your query.
    Thanks,
    Gordon

  • Cannot edit a field that is "Standard Report Column" when new row added

    Hi everyone,
    I have created a master-detail form from the wizard and within the detail report region source I have used apex_item.xxx API
    example;
    select C1, C2,
    CASE when C2 ='N' then
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'ENABLED', 'NO',null,null, 'f03_#ROWNUM#')
    else
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'DISABLED', 'NO',null,null, 'f03_#ROWNUM#')
    END C3
    from table;
    All columns C1,C2,C3 are defined as "Standard Report Columns".
    The results allows the column C3 field to be enabled or disabled for input depending on a condition.
    The problem is when you hit the default button "Add Row" to add a new row. The row is non-editable and is populated with null values.
    What I want is to allow input when a new row is inserted into the multi-row detail form.
    Can any one help?
    Is there a way to change the Display As field for the new row columns to "text field" from "standard report column" dynamically?

    I think you will need to use the old way of adding rows instead of the new one. I remember having headaches trying to get it working.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Finder in column view has no expander divider on the last column

    I deal with a lot of graphics on my computer and I have a lot of subfolders. While in finder in column view there is no expanding divider for the last column when it is showing a graphic. When I first open a photo or graphic in finder the last column shows the graphic smaller than regular size. In SL there was a column divider to expand only that last column so I could make the graphic larger to see it better. Now in Lion there is no divider on the right side of that last column to expand the last column where the grahic is showing. In order for it to finally expand I have to drag the right side of the Finder window all the way across my display until the bottom slider bar disappears and then that last column will expand. This is frustrating having to have my Finder all across my display just to get the graphic larger.
    Is there a way to get an expander divider to show up for the last column when viewing a graphic in column view? I know I can click on the "eye" icon to see it, but the column view will expand the graphic larger than 100% so I can see more details.
    Thanks for any and all help.
    Connie

    Yes, that is how my whole finder window expands across my display until the bottom slider bar disappears....then and only then does the last column expand. I have to have open as many as 8 columns to get to my graphic. Keeping the Finder window to a smaller size and using the bottom slide bar to navigate to the far right column is nice, but all I want is that far right column where my graphic is showing to expand so I can see it better.
    Thanks but what you suggest only resizes the whole Finder window until it can expand no further, then the last column expands the graphic. But then my whole display is a huge Finder window.

  • Setting default value for form field assoc with a table column

    On a "Create Record" situation I was trying to set the default values of some form fields using a page level "Process". These form fields have Source Type = Database Column. It wasn't working, I could only set non-db assoc form field values no matter when the "Process" was set to exec. From some other posts it seems that this is by design, ie. not being able to programatically set the initial values of form fields that are sourced to db columns. I was hoping to have just one "Process" that would exec to set these initial values in one place rather than scattered about for each field that needed a default value. These particular default values come from ref tables and may be different for each user.
    So, it looks like I have to use a "Default Value" plsql chunk for each field on the form itself or else set their value on the calling form's Redirect in the "Set these Items" area.
    Is this correct?

    You could define a database function which accepts the name of the item and the user ID of the user running the application. Based on the item name and the user ID have the function return the appropriate initial value. Invoke this function in a "Default Value" PL/SQL block.
    Does that help in centralizing your initial values? You could have one function per page or one function per application. I would do one function per application.

  • Can I perform a lookup to verify the value of a variable is contained in another list column?

    I am working in Sharepoint Designer and am trying to figure out how I can set a condition in an approval workflow to only complete a task if the value of a variable is contained in another list column. So if I had a list called A with column
    A1 and I am  working in the approval workflow, I only want the approval to complete if my variable is equal to any value in list A column 1. Otherwise I want to keep the approval task pending. I am very new to sharepoint so any help would be appreciated.
    Thank you.

    Hi,
    You can use the condition "if any value equals value". Please  refer below links for reference.
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-conditions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376962.aspx
    http://www.codeproject.com/Articles/125120/Step-by-Step-Guide-in-Developing-your-own-Workflow
    Best Regards,
    Pavan Kumar Sapara.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem.
    s p kumar

  • Storing more than 2000 characters in a varchar2 column in Oracle 11g?

    We have a table in Oracle 11g with a varchar2 column. We use a proprietary programming language where this column is defined as string. Maximum we can store 2000 characters (4000 bytes) in this column. Now the requirement is such that the column needs to store more than 2000 characters. The DBAs don't like BLOB, CLOB or LONG datatypes for maintenance reasons.
    There are 2 solutions I can think of -
    1. Remove this column from the original table and have a separate table for this column and then store each character in a row, in order to get more than 2000 characters. This table will be joined with the original table for queries.
    2. If maximum I need is 8000 characters, can I just add 3 more columns so that I will have 4 columns with 2000 char each to get 8000 chars. So when the first column is full, values would be spilled over to the next column and so on.
    Which one is a better and easier approach? Please suggest.

    Visu - Some people also do not like to use LOBs because of difficulty in reclaiming space and ever increasing LOB segments. Some of these problems were caused by Oracle bugs (eg, Bug 2944866 Free space in LOB table / tablespace not reused with ASSM, Bug 3019979 Space may not be reused efficiently in a LOB segment) - albeit in 9.2. I've seen a few bug reports for similar things in 10.2 (don't have the references). Still, if there is a workaround/patch is this reason enough to steer the application development into a new direction?

  • What is the "variable" field in the timer.swf widget for?

    I have captivate 7, and would like to know what the variable field is for in the timer widget and how to use it...
    Thank you!

    Hi Lilybiri,
    I am playing with $$cpInfoElapsedTimeMS$$....
    I have an action attached to a button in my project that assigns my variable $$TimeSoFar$$ with $$cpInfoElapsedTimeMS$$.  That is all this action does.  I also have a text caption that includes $$TimeSoFar$$ on the same slide.  When I enter the slide  $$TimeSoFar$$ in the text caption is 0, as that is the original value I set to the variable.  This makes sense. When I trigger the for the first time with the button, I receive a negative number in my text caption as the value for $$TimeSoFar$$.  When I trigger that action a second time, it seems to be correct ans is the correct value of $$TimeSoFar$$ . It is also correct everytime after that.
    Any idea why this is happening?
    Thank you !
    Ryan

  • Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Is it possible to make a fillable form have variable fields - so if you select a radio button it triggers a different form field to be seen depending on which radio button is selected??

    Yes, one needs to use some custom JavaScript code to control the other fields' properties.
    Disabling (graying-out) Form Fields by Thom Parker

  • Sort Order for a VARCHAR2 Column

    Hello Everyone,
    This is probably quite simple, however I cannot see it. I am trying to sort on a varchar2 column that has numbers, text, dashes, tildes, carets and underscores which are mixed to compose a wire number. I have come up with an order by that changes the sort order from alpha to numeric satisfying one portion of the requirement.
    select wirenbr,fromitem "from",frompin,diagnbr,sht,toitem,topin,effect
    from acft_wires
    order by decode(to_char(nvl(length(translate(wirenbr,'A1234567890','A')),0)),'0',lpad(wirenbr,18),wirenbr);
    The select returns:
    1
    2
    3
    20
    21
    200
    201
    1000
    A
    ADT1
    AEN1
    AE1
    AE9
    AFA
    B
    1A
    2U7230A-ZZ
    2000A
    213-22
    22X100A20
    220-11
    The customer preferred sort looks like:
    1
    2
    3
    10
    10A
    11
    200
    201
    201-01
    202
    1000
    1000A
    1001
    I will build a shrine in my hall of honor to this forum if someone can point me in the right direction on how to solve this problem.
    Thanks everyone for your help.

    ok, start with this
    order by
    translate(substr(wirenbr,1,1),'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-','0000000000ZZZZZZZZZZZZZZZZZZZZZZZZZZZ')
    , nvl(length(substr(wirenbr,1,instr(translate(wirenbr,'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-','1234567890XXXXXXXXXXXXXXXXXXXXXXXXXXX'),'X')-1)),length(wirenbr))
    , to_number(translate(wirenbr,'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-','123456789000000000000000000000000000'))
    First, all that start with number go to the beginning and all that start with a letter go to the end.
    Next, sort by the length of the first numerical part, as per Al's first solution.
    Next, sort by the numerical part.
    I started getting what I think is the right sort by that point. However, I think that you'll also have to add
    stuff to sort by the alpha part, mine was
    , NVL(RTRIM(LTRIM(wirenbr,'0123456789'),'0123456789'),0)
    The biggest problem I see is all of the different number-letter-number
    number-letter-number-letter formats. How many levels of recursion you'll have to go through to get it perfectly sorted, could you have ZZ999ZZ99Z9Z9Z9Z99?
    Any ideas for breaking this value up?

  • TO_NUMBER function on varchar2 column with numbers and strings

    I need to create a column in a view that converts a varchar2 column data to number. The problem is that some
    of the data have strings and some numbers. I get "ORA-01722: invalid number" error when Oracle tries to covert
    strings (e.g. 'ABCD') to number. What I need is to get a NULL value if the data is an invalid number.
    How can I rewrite the following to get NULL value is a string is invalid number?
    select to_number('abcd') numberColumn
    from dual
    thanx
    Alfred

    SQL> select * from test_char_num;
    ALPHA_NUM
    ABC
    DEF
    123
    234
    A12
    SQL> select decode(NVL(length(trim(translate(alpha_num, '1234567890', ' '))), 0),
      2                0, alpha_num, 'NULL') new_alpha_num
      3  from test_char_num;
    NEW_ALPHA_
    NULL
    NULL
    123
    234
    NULLP.S I am printing 'NULL' just to show the result, Please replace the 'NULL string with NULL value in SQL.
    Thx,
    Sri

  • Range Partitioning on Varchar2 column???

    We hava table and it has a date column and its type is varchar2.
    This column's format is '16021013' ('ddmmyyyy').
    We want to make range partition on this column. What will be the best way?
    do you think virtal column partitioning will be efficient?

    >
    I'm not a new DBA:-) You can be sure. I asked only about range partitioning trick with varchar2 column because we did our examination about this table. We will need to archive this table quarter by quarter to the other archive database. Then, off course, nearly all queries are coming firstly by using this date column and they can have different filtering inside "where" conditions. Already, this table has index on this column but with huge number of data, index performance is not enough for us. This is a 7x24 banking system and we are lately joined to this project. Because of this, we cant change everything like changing data type of that column after this moment.
    >
    You are taking things way too personally. No one said anything about whether you were, or were not, a DBA or made any other comments about your skill or abilities.
    What we ask was for you to tell us WHAT the problem was that you were trying to solve and WHY you thought partitioning would solve it.
    And now, after several generic posts, you have finally provided that information. We can only comment based on the information that you post. We can't guess as to what types of queries you use or what kinds of predicates you use in those queries. But we need to know that information in order to provide the best advice.
    Next time you post put the important information in your original question:
    1. A table column is VARCHAR2 but contains a date value. We are unable to change the datatype of this column.
    2. We need to archive data quarterly based on this date value
    3. Nearly all queries use this date value and then also may have additional filter conditions
    4. This date column is indexed but we would like to improve the performance beyond what this index can give us.
    The above is a summary that includes all important information that is needed to know how best to help you.
    And I made a pretty good guess since two replies ago I provided you with example code that shows just how to partition the table.
    >
    Now, our only aim is how to make range partitioning this varchar2 date column.
    >
    As I showed you in my example code earlier you can add a virtual column to the table and partition on it. My example code creates a monthly partitioned table that allows you to archive by month or archive every three months to archive by quarter.
    You can modify that example to use quarterly partitions if you want but I would recommend that you use standard monthly partitions since they will satisfy the widest range of predicates.

  • Format varchar2 column which stores a number and display it in 10,000 forma

    Problem Description
    I am having a Standard VO , which has a varchar2 datatype attribute.
    In my view page i am dispaly this vo in a OATABLE.
    I want to foramt one of the varchar2 column to display it in a requried format
    Eg :- if the value in the column is 9999 i want to display it as 9,999.
    I have tried few sources but i did not work...
    I tried all the sources metioned below
    OAMessageStyledTextBean arcmrecovalue1=(OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2");
    arcmrecovalue1.setDataType("NUMBER");
    arcmrecovalue1.setAttributeValue(TABULAR_FUNCTION_VALUE_ATTR,formatter);
    String currency = "USD";
    arcmrecovalue1.setAttributeValue(CURRENCY_CODE,currency);
    arcmrecovalue1.setAttributeValue(OAWebBeanConstants.CURRENCY_CODE,"USD");;
    arcmrecovalue1.setAttributeValue(*ON_SUBMIT_VALIDATER_ATTR*,*formatter*);
    OAMessageStyledTextBean arcmrecovalue2=(OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2");
    if(arcmrecovalue2 != null)
    String arcmrecovalue = (String)((OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2")).getValue(oapagecontext);
    String retValue = null;
    try
    OADBTransaction oadbtransaction = l_rootAM.getOADBTransaction();
    String s = "{? = call convert_string(?)}";
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransaction.createCallableStatement(s,0);
    oraclecallablestatement.registerOutParameter(1,Types.VARCHAR);
    oraclecallablestatement.setString(2,arcmrecovalue);
    oraclecallablestatement.execute();
    retValue = oraclecallablestatement.getString(1);
    catch(SQLException sqlexception)
    throw OAException.wrapperException(sqlexception);
    catch(Exception exception)
    throw OAException.wrapperException(exception);
    arcmrecovalue2.setAttributeValue("Arcmrecovalue2",retValue);
    * The sql function wil return the formatted string.. but it is able to format only the first value of the table.. the second row is not formatted.
    Can anyone help me

    Problem Description
    I am having a Standard VO , which has a varchar2 datatype attribute.
    In my view page i am dispaly this vo in a OATABLE.
    I want to foramt one of the varchar2 column to display it in a requried format
    Eg :- if the value in the column is 9999 i want to display it as 9,999.
    I have tried few sources but i did not work...
    I tried all the sources metioned below
    OAMessageStyledTextBean arcmrecovalue1=(OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2");
    arcmrecovalue1.setDataType("NUMBER");
    arcmrecovalue1.setAttributeValue(TABULAR_FUNCTION_VALUE_ATTR,formatter);
    String currency = "USD";
    arcmrecovalue1.setAttributeValue(CURRENCY_CODE,currency);
    arcmrecovalue1.setAttributeValue(OAWebBeanConstants.CURRENCY_CODE,"USD");;
    arcmrecovalue1.setAttributeValue(*ON_SUBMIT_VALIDATER_ATTR*,*formatter*);
    OAMessageStyledTextBean arcmrecovalue2=(OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2");
    if(arcmrecovalue2 != null)
    String arcmrecovalue = (String)((OAMessageStyledTextBean)oawebbean.findChildRecursive("Arcmrecovalue2")).getValue(oapagecontext);
    String retValue = null;
    try
    OADBTransaction oadbtransaction = l_rootAM.getOADBTransaction();
    String s = "{? = call convert_string(?)}";
    OracleCallableStatement oraclecallablestatement = (OracleCallableStatement)oadbtransaction.createCallableStatement(s,0);
    oraclecallablestatement.registerOutParameter(1,Types.VARCHAR);
    oraclecallablestatement.setString(2,arcmrecovalue);
    oraclecallablestatement.execute();
    retValue = oraclecallablestatement.getString(1);
    catch(SQLException sqlexception)
    throw OAException.wrapperException(sqlexception);
    catch(Exception exception)
    throw OAException.wrapperException(exception);
    arcmrecovalue2.setAttributeValue("Arcmrecovalue2",retValue);
    * The sql function wil return the formatted string.. but it is able to format only the first value of the table.. the second row is not formatted.
    Can anyone help me

  • Oracle Best practices for changing  Byte to Char on Varchar2 columns

    Dear Team,
    Application Team wanted to change Byte to Char on Varchar2 columns to accommodate Multi byte character  on couple of production tables.
    Wanted to know is it safe to have mixture of BYTE and CHAR semantics in the same table i have read on the couple of documents that It's good practice to avoid using a mixture of BYTE and CHAR semantics columns in the same table.
    What happens if we have mixture of BYTE and CHAR semantics columns in the same table?
    Do we need to gather stats & rebuild indexes on the table after these column changes .
    Thanks in Advance !!!
    SK

    Application Team wanted to change Byte to Char on Varchar2 columns to accommodate Multi byte character  on couple of production tables.
    Wanted to know is it safe to have mixture of BYTE and CHAR semantics in the same table i have read on the couple of documents that It's good practice to avoid using a mixture of BYTE and CHAR semantics columns in the same table.
    No change is needed to 'accommodate Multibyte characters'. That support has NOTHING to do with whether a column is specified using BYTE or CHAR.
    In 11g the limit for a VARCHAR2 column is 4000 bytes, period. If you specify CHAR and try to insert 1001 characters that each take 4 bytes you will get an exception since that would require 4004 bytes and the limit is 4000 bytes.
    In practice the use of CHAR is mostly a convenience to the developer when defining columns for multibyte characters. For example for a NAME column you might want to make sure Oracle will allocate room for 50 characters REGARDLESS of the actual length in bytes.
    If you provide a name of 50 one byte characters then only 50 bytes will be used. Provide a name of 50 four byte characters and 200 bytes will be used.
    So if  that NAME column was defined using BYTE how would you know what length to use for the column? Fifty BYTES will seldom be long enough and 200 bytes SEEMS large since the business user wants a limit of FIFTY characters.
    That is why such columns would typically use CHAR; so that the length (fifty) defined for the column matches the logical length of the number of characters.
    What happens if we have mixture of BYTE and CHAR semantics columns in the same table?
    Nothing happens - Oracle could care less.
    Do we need to gather stats & rebuild indexes on the table after these column changes .
    No - not if you by 'need' you mean simply because you made ONLY that change.
    But that begs the question: if the table already exists, has data and has been in use without their being any problems then why bother changing things now?
    In other words: if it ain't broke why try to fix it?
    So back to your question of 'best practices'
    Best practices is to set the length semantics at the database level when the database is first created and to then use that same setting (BYTE or CHAR) when you create new objects or make DDL changes.
    Best practices is also to not fix things that aren't broken.
    See the 'Length Semantics' section of the globalization support guide for more best practices
    http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch2charset.htm#i1006683

  • Storing a Non Printable -from keyboard- Character in Varchar2 Column

    Hi,
    I want to store a non-printable character in a varchar2 column. This character should be non-printable -from keyboard- for all character sets -or very difficult to print from keyboard-. It doesn't matter, whether it can be displayed on screen or not. It does matter INSTR function returns the character position of that character. It should be able to import export data without any problem for any NLS specific operating environment. For example, I plan to use chr(1) do you think it's appropriate? I appreciate your helps.
    Best Regards,
    Salim

    What is the business requirement you're trying to satisfy?
    If your database character set is based on ASCII, CHR(1) (the Start of Header) character is likely to be transferred between systems without character set conversion. Non-ASCII character sets (i.e. Big5 for Chinese data) don't necessarily share the same control characters, though, and generally won't have the same binary representation of an ASCII control character (so CHR(1) in a non-ASCII based database wouldn't necessarily return the same character that CHR(1) would in an ASCII based database).
    Justin

Maybe you are looking for

  • IPod touch (4th generation) panic.list problem

    iPod Touch 4gen started having panic.plist error reports in diagnostics and also preformed a self-reboot when in the middle of watching a video (kernel abort type 4)

  • Entry in CRMC_OBJECTS when creating new BOL Object??

    Hi All, when creating an new BOL Object, that is creating an entry in SPRO under Extend Model for Business Transactions with New Nodes the second field is called "Object Name". One must enter a value there when creating a new BOL Object. This field a

  • Cache FLV on Proxy servers?

    Hi all, We are planning to build a website that shows video through Flash. The thing is that my customer does not want us to use a streaming Server like Flash Media Server. (It's a shame) Anyway, we are bound to use progressive download for Flash Vid

  • Value conversion according to User default

    Hi, I have a Problem in a BDC. I am trying to populate pick quantity filed in my BDC ( Tcode VL02N ) the BDC works fine for a particular user default setting( NNN,NNN.NN ). But is the same program is used by some other user whose Default settings are

  • Text cannot be parsed

    Getting an Rdl definition error going from 2005 to 2008 SSRS, cannot  be parsed. The expected text format is "name, size[units[, style=style1[, style2, ...]]]". My Code: <CustomProperty> <Name>Expression:Chart.Titles.0.Title.Font</Name> <Value>=("Ari