ADD COMMAND-link 2 fields where numeric value matches

I have a Add Command that looks like this.
SELECT *
FROM "AS400"."MTMODBC"."#MTMTRP" "_MTMTRP"
LEFT OUTER JOIN (
SELECT CHGTRP, CHGFCD, Max(CHGDTE) As Max_CHGDTE, Max(CHGTIM) As Max_CHGTIM
FROM  "AS400"."MTMODBC"."#MTMTCHG" "_MTMTCHG"
WHERE CHGFCD= '076'
GROUP BY CHGTRP, CHGFCD
) C1
ON
TRIP#=CHGTRP
LEFT OUTER JOIN "AS400"."MTMODBC"."#MTMGAS" "_MTMGAS" ON (TRIP#=GTRIP#)
LEFT OUTER JOIN "AS400"."MTMODBC"."#MTMMBR" "_MTMMBR" ON (TCSTKY=MCSTKY)
LEFT OUTER JOIN "AS400"."MTMODBC"."#DMSFAC" "_DMSFAC" ON (TDELZP=DFZIP and DFADDR1=TDELVA)
LEFT OUTER JOIN (SELECT TRIP# AS NTRIP#, THCPCS
FROM "AS400"."MTMODBC"."#MTMND" "_MTMND") N1
ON TRIP#=NTRIP#
WHERE TINSCD= '0342' and
(TRPFLG Like 'S%' OR
TRPFLG in ('X1','X2','X3')) and
TREASC not in ('53','81') and
TAPTDT>=20101001 and
TAPTDT<=20110331
The bolded fields are Alpha numeric and I would like to match them on values
EX: DFADDR1 has a value 123 High St
and TDELVA has a value 123 High St
How do I match them on the first 3 digits?
Thanks!
Achett13

Hi,
What about using  substing function in the join.
(TDELZP=DFZIP and substr(DFADDR1,0,3)=substr(TDELVA,0,3))
I have assumed that numeric filed length is fixed.Which is the database?
Regards,
Bilahari M

Similar Messages

  • Popup is not getting launched click on command link in table column value

    Hi
    We have a scenario where we bring the pop-up clicking on command link in the table column value. It was working fine before but from last few labels this is not working.
    Here is the code snippet that we are using,
    <af:table>
    <af:column>
    <af:commandLink>
    <af:outputText value=”product name” />
    <af:showPopupBehavior TriggerType=”click” PopupId=”::p1”/>
    <af:commandLink>
    </af:column>
    </table>
    <af:popup id=”p1”>
    <af:dialog>
    </af:dialog>
    </af:popup>
    Thanks,
    Nagesh

    It is important to set partialSubmit="true" in the <af:commandLink> tag. A full submit will be made otherwise and the popup will not show. Use also tryggerType="action" instead of triggerType="click" and use the proper chararcter case of the tag attribute names. Try with this:
    <af:commandLink text="product name" partialSubmit="true">
      <af:showPopupBehavior popupId="::p1" triggerType="action"/>
    </af:commandLink>Dimitar

  • Guid Downloading Character field with numeric value

    Hi All,
    I am downloading one table through gui_download, file type is asc. While downloading the internal table contains one field
    w_lif(20) type c, which contains the value '1234545567' all numeric value, now in excel it is displaying as exadecimal , here i need to convert the type of the column in excel to see the actual value.
    could you please tell me ,  how to get actuall value directly to excel
    your valuable help is appreciated.
    Regards,
    Siddivinesh Jogu

    Hi,
    You can try the File Type as DBF. This retains the format of all the columns as Data.
    Please let me know if this help,
    Regards,
    Janani

  • Calculating a count of rows where value matches another column value in the same table

    Hi,
    I'm struggling to do something in DAX that seems to me should be super easy (coming from a SQL world)!
    That is to count all rows in column 1 where the value matches the current value for column 1?
    E.g something like this:
    [Col2]=Count of rows in [Col1] where value = this.[Col1]
    Where the results are as in the table below:
    Col1, Col2
    A, 2
    A, 2
    B, 1
    Anyone?
    Martin Laukkanen
    Nearbaseline blog - nearbaseline.com/blog
    Bulk Edit and other Apps - nearbaseline.com/apps

    Thanks, that's perfect! 
    I knew it had to be something so simple, but after spending over an hour banging my head against those exact functions I couldn't get anything working!
    Martin Laukkanen
    Nearbaseline blog - nearbaseline.com/blog
    Bulk Edit and other Apps - nearbaseline.com/apps

  • Command links as column cell content...

    Hi
    I am trying to add command links as cell content. Clicking on one of the links will cause the outputText component located at the bottom to be updated.
    However, I can't differentiate the different links. Since the commandLink is generated for each row of data, the id generated for each commandLink component is the same. That is, I am getting the same ID when I call
    public void commandLinkActionListener(ActionEvent ae) {
    CoreCommandLink ccl = (CoreCommandLink) ae.getSource();
    System.out.println("commandLinkActionListener: " + ccl.getId());
    Is there any way to differentiate or pass unique data to the above action listener?
    The following is the code segment:
    <af:table emptyText="No items were found" value="#{MyTableBean.tableValue}"
    var="row" id="table">
    <af:column sortable="false" headerText="Name" formatType="text"
    id="nameColumn">
    <af:commandLink actionListener="#{MyTableBean.commandLinkActionListener}"
    partialSubmit="false" text="#{row.name}">
    </af:commandLink>
    </af:column>
    </af:table>
    <af:outputText value="Column Trigger: #{MyTableBean.text}" partialTriggers="nameColumn"/>
    Would appreciate any help on this.
    Thanks

    Found the answer from one of Frank's blog.
    public void commandLinkActionListener(ActionEvent ae) {
    CoreTable ct = (CoreTable) ae.getComponent().getParent().getParent();
    Object data = ct.getRowData();
    The data object is the type of object that you add to your List or CollectionModel.
    Note that the commandLink is a child of the column which is a child of the table.

  • Display Field value matching

    Hi All,
    One of the Sub table contains two fields as Display Fields : Name(Default)  and  Identity .
    In Import manager I want Value Map the Identity field with One of the field in Source File.The problem is Map button is Disable  for the Identity field but its enable for the Name Field?
    While creating identity Field in the Repository Am i Missing Anything?  How can i enable the map button for Identity Field?

    Hi Priya,
                 Whenever we have more than one display field, we need to create compound field before
                proceeding to vaue mapping.
               Here Name and Identity both are display fields.After you use split into hierarchy command for identity field , do field mapping.As soon as you complete field mapping , go for creating compound field.
               To create compound field,
              Right-click in the Source Hierarchy tree and choose Create Compound
              Field from the context menu.   MDM adds the compound field to the Source Hierarchy tree and to 
              the  list of fields in the Source Fields grid.
             The compound source field appears in the Source Field grid as “compound lookup field <source field
             1; source field n>” (where “compound lookup field” is the name of a destination lookup field
             and “source field n” is the name of the nth source field).
               Hope it helps.
              Thanks,
              Narendra.M

  • How can I validate numeric values in a text field?

    Hi
    Once more I have a problem.
    I have a field in which the user should enter 10 digits in the pattern 999999-9999. The field must only contain numeric data and must be exactly 10 characters. I have a validation script on the print button, that prevent printing if required fields are empty or not properly filled out.
    I have tried two ways to work this out, and I'm not satisfied with any of them, as I can still print despite of validation scripts and warning messages.
    1.
    I set the field to numeric, limited to 11 characters.
    Display pattern num{999999-9999}, edit pattern num{999999-9999} and validation pattern num{999999-9999}
    Problems using this solution: When I type 11 digits in the field (ex.12345612345) I get a warning message and 12.345.612.
    But when I type 9 digts (ex. 123456-123 or 123456123) I get no warning message and 000000-0000 or 012345-6123
    If I type alphabetical characters (ex. 123456-abcd) I get no warning message and 000000-0000.
    2.
    I set the field to text field, limited to 11 characters.
    Display pattern text{999999-9999}, edit pattern text{999999-9999} and validation pattern text{999999-9999}
    Now when I type 11 digits in the field (ex.12345612345) I get no warning message and 12345612345.
    When I type 9 digts (ex. 123456-123) I get no warning message and 123456-123
    When I type 9 digts (ex. 123456123) I get a warning message and 123456123
    If I type alphabetical characters (ex. 123456-abcd) I get a warning message and 123456-abcd.
    It works slightly better as a text field, but I am not satisfied at all.
    Has anyone a solution to this?
    Additional I would also like the hyphen to emerge automatically when typing.
    K

    I just want to summarize my experience.
    I found a related discussion here: http://forums.adobe.com/message/2513720#2513720.
    Putting the pieces together I came up with this solution.
    form1.subform.TextField1::exit - (JavaScript, client)
    var      
    myRegex = /\d{6}\-\d{4}/;
    var   
    singleDigits = [0,1,2,3,4,5,6,7,8,9]; // array for single digit check
    if   
    (this.rawValue != null || this.rawValue != ''){ // only if the field has a value...
         if (!this.rawValue.match(myRegex)){ // and it doesnt match the pattern (i.e. 2 digits)
         this.rawValue 
    = ''; // clear the field
         xfa.host.setFocus( 
    this); // set focus back to the field
         xfa.host.messageBox('Error: Pattern Conflict. Please use the pattern 999999-9999.'); 
    // enter any message you wish here
    Kirstine

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

  • How do I add numeric values as text in XML??

    HI,
    So, I've developed a 3d carousel using this tutorial and the  XML, and customized the XML in Dreamweaver.
    http://www.gotoandlearn.com/play?id=33
    Now,  I've got the carousel set up exactly the way I would like, but the only  trouble, is how do I add numeric values as the text for the xml file???
    Here's an example to the working carousel and where text is loaded for each item on it.  (put your sound on mute if you don't want to hear the video)
    http://iongeo.com/collaboration_test_dev/video_arctic_imaging.html
    For  example, in my XML, if I would like the text to be "3d images", when I  export the FLA, only "d images" comes through because the numeric  values can't be added as the text for the tooltip.
    Does anyone  have any ideas?
    Here is an example of how the XML is loaded into  the .swf - the text loads great, but just not the numeric characters.
    The  same story can be said for special characters, I would like to know how  to add a "&" sign too.
    <icons>
    <icon  image="images/Subsalt_E_P_Partnerships.png" tooltip="3D Images"  content="Text Copy.">
    </icon>
    </icons>
    Any  help would be greatly appreciated.
    Thank you.

    Hi Randy,
    Thanks a lot for the reply.  Your post got me thinking that it's actually a flash problem, as the actual descriptor text shows 123,etc and "&".
    The trouble is that the icons are dynamically loaded from the XML to movie clips on the flash file.  I've asked the flash forum to see if they could take a look.
    Thanks again.
    Mike

  • Add numeric value to Table Column

    Hello,
    my problem:
    I have a VO with a numeric attribute (Sal). This VO is shows in a table in a JSF Page.
    I need to add to the column value a numeric value.
    I try with #{row.bindings.Sal.attributeValue*2} or #{row.Sal+2} or #{row.Sal.inputValue+2} But I get an error.
    Can someone help me ?
    Thank You
    JDev 11.1.3

    Hi,
    an option would be to use a transient attribute in the VO to compute the maths or to populate the column field from a managed bean. You can point the column field to a managed bean property (say sumSal). In this method getSumSal() you
    1. Use ELContext, ValueExpression, and ExpressionFactory to resolve the #{row} reference (you can cast it to oracle.jbo.domain.Row
    2. call row.get("attribute_name") to access the field value
    3. Perform the computation and return the value to display in the table
    Note that using a transient attribute may be easier to achieve and easier to reuse in other usages of the VO. However, you have to options
    Frank

  • How to check non-numeric value in a field

    Hi all,
    I have a field 'MVALUE'. HOw can I check if I have a non-numeric value in my field. Let us say if I have a value '<25' in this field. How can I check if the value in this field is non-numeric. The field MVALUE is of CHAR datatype.
    Please help. Waiting.........

    Might have to add a space in the string...
    if not mvalue co ' 0123456789'.
    * error
    endif.
    if you allow decimals and commas...
    if not mvalue co ' .,0123456789'.
    * error
    endif.

  • Searching for numeric values in a text field / SQL Server

    Hi all,
    here's a problem that I've been trying to solve for several days: I try to select rows from an MS SQL Server via JDBC that contain a certain numeric value at a certain position in a long varchar field.
    I'm using queries like
    select * from table where substring(field_1, 37, 7) like '1011234';Those queries always return an empty ResultSet. If I use the same queries in WinSQL, I get correct results (several rows).
    The application code is working in principle; if I search for a text instead of a numeric value, for example select * from table where substring(field_1, 4, 5) like 'Paper'; , I get a complete ResultSet.
    I've tried many variations (= instead of like, search in the entire field (without substring but with like '%1011234%'), with or without ', and more), but that didn't change anything.
    It's also most probably not caused by the JDBC driver; I have tried JTDS first, and then the MS driver (newest versions) - no difference.
    One idea was that the sort order is not correct, tried some COLLATE settings, but that didn't help so far. In this context I'd like to know how to determine the collation sequence of a certain column.
    Another thing I tried was using CAST, for example SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST('1011234' as bigint); or SELECT * FROM table WHERE CAST(SUBSTRING(field_1, 37, 7) as bigint) = CAST(1011234 as bigint);, but that didn't help either.
    Some facts:
    Server: Microsoft SQL Server, version 09.00.2047
    Driver in WinSQL: SQLSRV32.DLL, version 03.85.1117
    JDBC-Driver:
    - JTDS, version 1.2
    - Microsoft SQL Server 2005 JDBC Driver, Version 1.2
    JVM: jre1.5.0_11
    I didn't find anything on Google, or in this forum, or other forums. I really hope someone here can help me. Thanks in advance!
    Best regards,
    Uica

    Your note suggests to me that this is a coding problem, not a JDBC or SQL problem unless you are hitting a bug in the SQL Server JDBC driver. Others may have ideas from what you have written, but I think it would be helpful to see the actual code that you are executing that does not bring back the results that you are expecting (don't forgot to use code tags to format your code correctly).
    It might also be helpful to execute a query (from within your Java code) to ensure that you are connecting to the right database, accessing the correct table and that your substring is using the correct offset. The query would look something like this (and then of course display the list of results):
    SELECT substring(field_1, 37, 7) from table

  • Render link depending on calculated value of another field

    I am using jdeveloper 11.1.2
    I have table with many columns, and the last column contains commandLink
    I want to render this command link depending on calculated function (FileExport.getTranslateFileName) using another fields in the table (row.SciId) as parameters
    <af:column>
    <af:commandLink" rendered="#{FileExport.hasTranslateFile}">
    </af:commandLink>
    </af:column>
    how can I implement that without adding transient field?

    yes FileExport is managed bean
    DCIteratorBinding iterator = getBindings().findIteratorBinding("UpdateRequestDCIterator");
    Row row = iterator.getCurrentRow();
    Object sciIdObject = row.getAttribute("SciId");
    but I don't know how to get the correct value of (row.SciId) for each row in my table
    my code always return the same value for the first row

  • Linking 2 tables with Sql Expressions or add command

    Hi
    I want to make a custom table using a union all using cr2008 but I'm unable to find/enable the sql expressios field? It's just not there?
    I've tried using the add command is the database expert but I cant see how to get this work.. I have 2 data sources that each consist of identical tables (but different data).  I have 2 tables I want to link:
    datasource1 statstable
    datasource2 statstable
    So I want to do:
    SELECT * FROM datasource1 statstable
    UNION ALL
    SELECT * FROM datasource2 statstable
    but it wont let me do this as the 2 stats tables are in different datasouces.
    I would really appreciate any help you can give me.
    thanks

    you can not do this unless you use busines views.
    you can not create one report based on two different datasources using crystal reports,
    my advice to you to solve this problem
    start to look for the "business views"
    which allow you to create a strucutre based on many different datasources, you create 2 connections for your datasources and map them in the view.
    then you use those business views in crysal reports to create you report.
    it may looks complicated, but i admit its too easy and not hard.
    you can get a small book about business views manager which comes with BO XI R2 or Xi 3.0
    from the business objects support site.
    i hope it was clear for you
    good luck

  • 2005 B1: Clear Link field value

    Hi,
    I have a UDF field of type "General" and Structure "LINK" on the A/P Invoice screen. My addon requirement is
    to clear this field each time a user duplicates an A/P invoice. How can I do
    this via the UI API?  What object in the UI API should I associate with this
    fied e.g. Edit Text, Static Text etc.
    I got an error message "Item is not editable" when I tried to clear the value. See code below for the "Duplicate" menu click:
    if(pVal.MenuUID=="1287")
    SAPbouiCOM.Form frmAPInvoice;
    frmAPInvoice=gapp.Forms.GetForm("-141",1);
    frmAPInvoice.Items.Item("U_Attach").Enabled=true;
    //<b>This line returns an object type of it_EDIT</b>
    object s = ((SAPbouiCOM.Item)frmAPInvoice.Items.Item("U_")).Type;
    // THIS LINE WORKS OK
    string str = ((SAPbouiCOM.EditText)frmAPInvoice.Items.Item("U_Attach").Specific).Value;
    //ERROR HAPPENS ON THIS LINE          
    ((SAPbouiCOM.EditText)frmAPInvoice.Items.Item("U_test").Specific).Value="";
    Please advise.,

    You get the error message because by default the UDF for a 'link' type field is not editable (ie. it is greyed out).
    There are a few restrictions in the UI API for system forms which you will need to work around to get desired results:-
    Limitation #1: You will not be able to change the editable property of the system item "U_test" to true.
    Limitation #2: You cannot simply set the value directly on the DBDataSource in a system form.
    One possible workaround for this is to use a custom edittext linked to the same underlying field(OPCH/U_test), which you can make editable and can change using the syntax .value = "".
    During Form Load of the UDF Window, add a new edit text to the form, bind it to the datasource for your link field and hide it.  eg:-
        'Add own field to form, bind it to UDF and hide it
        Set sboForm = sboApp.Forms.GetForm("-141", 1)
        Set sboItem = sboForm.Items.Add("U_test2", it_EDIT)
        Set sboEdit = sboItem.Specific
        sboItem.Visible = False
        sboEdit.DataBind.SetBound True, "OPCH", "U_test"
    On the duplicate menu click, make your custom field visible, blank its value and hide it again.  After doing this simply call the update method on the original UDF and it too should be blanked out.
        Set sboForm = sboApp.Forms.GetForm("-141", 1)
        Set sboItem = sboForm.Items("U_test2")
        Set sboEdit = sboItem.Specific
        'Make own field visible, blank its contents, hide it again
        sboItem.Visible = True
        sboEdit.Value = ""
        sboItem.Visible = False
        'Update original UDF
        Set sboItem = sboForm.Items("U_test")
        sboItem.Update
    John.

Maybe you are looking for

  • Database Link in the OWB

    We are trying to deploy a map that needs to use a database link to access the source table in another server. We could create database link on OWB and import tables. When we deployed it we receive the first error "VLD-2771: System privileges may not

  • How many emails can i send in one day with icloud

    how many emails can i send out in a day using icloud.com?  I want to send about 800 emails to all the parents at my children's school.  I am using pho and swiftmailer to send the emails. thanks.

  • Change Sender of Mail for PO pdf layout

    Dear All, We send PO layout via mail to the vendors .For this process , we use standard program SAPFM06P . According to standard program , the sender of mail is creation of PO ,however , We need to change the sender . Is there any way to change the s

  • Advice on recovery from hard disk error 301

    Hi all, I have a HP desktop PC, Pavilion HPE h8-1170d which is about 2.5 years+ old. The specifications are: Intel Core i5 2500 with 8G RAM, 1TB SATA hard disk. I have recently installed a Radeon HD6670 graphics card as the original card gave problem

  • IWeb/MobileMe storage capacity?

    I have a band music website and I hope to post 36 hours of music for streaming and downloading. - Is there a limit to how much i can put on an iWeb site(s) ? -Must fans buy QuickTimePro or will the free version allow streaming and downloading? -Quick