Can we use where clause in for-each: tag_name ?- urgent

Hi All,
I am using templated builder 5.5
1)2 G_LINE Repeating Groups will exist for every Invoice Line. Each will have an INVOICE_LINE_TYPE element, set as either ‘Line’ or ‘Tax’. Both of the G_LINE groups will be used to create the Invoice Lines output for a consolidated invoice.
2)<?for-each:G_LINES WHERE ORDER_LINE_TYPE = ‘LINE’?>
Data to be displayed...
<?end FOR-EACH?>
Repeating group to display all of the invoice lines associated with a particular consolidated invoice.
The XML Element to base repeating group on is G_LINES
Is it possible to use the above tags, if yes how an d if no, will this be suppoerted in 5.6.1 version?
Thanks in advance

Hi
You'll have to add the code but you can use XPATH to limit the data to the LINE data:
<?for-each:G_LINES[ORDER_LINE_TYPE = ‘LINE’]?>
this limits the rows to just those that satisfy the condition.
If you want to show the LINE and TAX data you would be better to loop over the G_LINES and then use an 'if' statement across the group. So you would have a two row table to hold the LINE and TAX data and then use a if@row statement to filter on LINE and TAX data.
Regards, Tim

Similar Messages

  • Can we use where clause in Update on Merge statement?

    Hi All,
    I tried to execute the following Merge Query:
    When this query is executed without ‘Where clause’ in Update statement its working fine. When executed with ‘Where clause’ it throwing the following error:
    ORA-00905: missing keyword.
    Following is the sample query which I tried to execute:
    MERGE INTO TABLE_NAME
    USING (SELECT COLUMN FORM TABLES)
    ON (CONDITION)
    WHEN MATCHED THEN
    UPDATE SET
         COLUMN UPATES
    WHERE CONDITION -- Can we use where clause here?
    WHEN NOT MATCHED THEN
    INSERT
    INSERT VALUES;
    Can some one help on this?
    Thanks in advance.
    Darius

    Yes:
    SQL> drop table emp1;
    Table dropped.
    SQL> create table emp1 as select * from emp where deptno = 30;
    Table created.
    SQL> update emp1 set sal = sal*2;
    6 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER           3000
    JAMES            1900
    6 rows selected.
    SQL> MERGE INTO emp1
      2  USING(select * from emp) emp
      3  ON (emp1.empno = emp.empno)
      4  WHEN MATCHED THEN
      5  UPDATE SET sal = emp.sal WHERE ename = 'TURNER'
      6  WHEN NOT MATCHED THEN
      7  INSERT(ename,sal) VALUES(emp.ename,emp.sal);
    9 rows merged.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER 1500
    JAMES            1900
    SMITH             800
    JONES            2975
    CLARK            2450
    SCOTT            3000
    KING             5000
    ENAME             SAL
    ADAMS            1100
    FORD             3000
    MILLER           1300
    14 rows selected.
    SQL> SY.

  • How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    How can I display total playlist size in iTunes 11.  It used to be visible for each playlist or CD, but I can't find it now.

    The Friend: Thanks from me too for that super simple fix!! I feel kinda stupid for not knowing that.
    Too bad Apple didn't:
    Give it a more intuitive name than "Status Bar"... "status" is what is shown at the top of the window along with the Artist and Song Title, e.g.; how far into the song/podcast/video I've played and how much is left,
    Put the keyboard commands in a more prominent place in their release notes when version 11 came out so we could more easily find the information they decided to hide in this attempt to make the desktop less cluttered and
    Allow us the option of displaying the data size along with the song count and duration just beneath the playllist title. The status bar is a redundant listing of information except for the data size!  Poorly conceived!
    Perhaps Apple will remedy this in a future release. For those of us who like to burn our playlists to CD, DVD and even a thumb drive this information is essential. WIthout it, we're left to guess whether a given playlist will fit on our target device.
    Thank you!

  • Howto use jsp with where-clause restriction for viewObject

    hello there,
    i am currently trying to figure out how to pass parameters via url to the jsp,
    so that the corresponding viewobjects where clause can be extended and i only get the select-results that i want. i am familiar with doing this in a stright java-environment but don't know how to implement it in a jsp-client.
    does anyone know something about this or can name me a ressource i can read about that.
    Thanx
    Selim Keser

    thank you, but i have only 19 days left for
    my diploma and nobody in this company can help me with this issue.
    what i need is an example or something like a reciept about what to do
    to achieve the following:
    I want to type in an url like:
    localhost:8080/myapp/browse.jsp?customerid=123
    so that i can extend the where-clause in my ViewObject
    and only see the rows of customer 123 in my jsp.
    it is a bit hard for a newbie to figure out how to pass down the parameters way down to the ViewObject. I am shure that this is easy to do once one understands the how it works. This is my first "Web-Experience" and I am running out of time.
    Thanx
    Selim Keser

  • Where can I find the file sizes for each application before downloading?

    Where can I find the file sizes for each application before downloading? I have limited download (525 MBs/day) because of Hughsnet and I need to know each applications total size before I download.

    You can go to the trial page to get an estimated size.  As the Creative Cloud products change over time though this may become less accurate.
    If you are on a limited bandwidth account then you may want to consider purchasing a perpetual copy of Creative Suite 6 as opposed to subscribing to the Creative Cloud.

  • Improve the performance in stored procedure using sql server 2008 - esp where clause in very big table - Urgent

    Hi,
    I am looking for inputs in tuning stored procedure using sql server 2008. l am new to performance tuning in sql,plsql and oracle. currently facing issue in stored procedure - need to increase the performance by code optmization/filtering the records using where clause in larger table., the requirement is Stored procedure generate Audit Report which is accessed by approx. 10 Admin Users typically 2-3 times a day by each Admin users.
    It has got CTE ( common table expression ) which is referred 2  time within SP. This CTE is very big and fetches records from several tables without where clause. This causes several records to be fetched from DB and then needed processing. This stored procedure is running in pre prod server which has 6gb of memory and built on virtual server and the same proc ran good in prod server which has 64gb of ram with physical server (40sec). and the execution time in pre prod is 1min 9seconds which needs to be reduced upto 10secs or so will be the solution. and also the exec time differs from time to time. sometimes it is 50sec and sometimes 1min 9seconds..
    Pl provide what is the best option/practise to use where clause to filter the records and tool to be used to tune the procedure like execution plan, sql profiler?? I am using toad for sqlserver 5.7. Here I see execution plan tab available while running the SP. but when i run it throws an error. Pl help and provide inputs.
    Thanks,
    Viji

    You've asked a SQL Server question in an Oracle forum.  I'm expecting that this will get locked momentarily when a moderator drops by.
    Microsoft has its own forums for SQL Server, you'll have more luck over there.  When you do go there, however, you'll almost certainly get more help if you can pare down the problem (or at least better explain what your code is doing).  Very few people want to read hundreds of lines of code, guess what's it's supposed to do, guess what is slow, and then guess at how to improve things.  Posting query plans, the results of profiling, cutting out any code that is unnecessary to the performance problem, etc. will get you much better answers.
    Justin

  • Performance hit using "where" clause in the query

    Hi All,
    I am facing a huge performance hit in the java code when using "where" clause in queries. Following are the details:
    1. SELECT * FROM Employee
    2. SELECT * FROM Employee where employeeid in (26,200,330,571,618,945)
    There is no difference in Query Execution Time for both queries.
    Business Logic Time is huge in second case as compared to first one (ratio - 1:20).
    Rows returned are more in first case as compared to second case.(ratio - 1:4)
    Business Logic is same for both the cases where I iterate through the ResultSet, get the objects and set them in a data structure.
    Does anybody know the reason of unexpected time difference for the business logic in the second case?

    Since you're mentioning clustering your index, I'll assume you are using Oracle. Knowing what database you are using makes it a lot easier to suggest things.
    Since you are using Oracle, you can get the database to tell you what execution plan it is using for each of the 2 SQL statements, and figure out why they have similar times (if they do).
    First, you need to be able to run SQL*Plus; that comes as part of a standard database installation and as part of the Oracle client installation - getting it set up and running is outside the scope of this forum.
    Second, you may need your DBA to enable autotracing, if it's not already:
    http://asktom.oracle.com/~tkyte/article1/autotrace.html
    http://www.samoratech.com/tips/swenableautotrace.htm
    Once it's all set up, you can log in to your database using sql*plus, issue "SET AUTOTRACE ON", issue queries and get execution plan information back.
    For example:
    SQL> set autotrace on
    SQL> select count(*) from it.ticket where ticket_number between 10 and 20;
      COUNT(*)
            11
    Execution Plan
    Plan hash value: 2983758974
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            |     1 |     4 |     1   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |            |     1 |     4 |            |          |
    |*  2 |   INDEX RANGE SCAN| TICKET_N10 |    12 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("TICKET_NUMBER">=10 AND "TICKET_NUMBER"<=20)
    Statistics
              0  recursive calls
              0  db block gets
              1  consistent gets
              0  physical reads
              0  redo size
            515  bytes sent via SQL*Net to client
            469  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> This tells me that this query used an INDEX RANGE SCAN on index TICKET_N1; the query can't do much better than that logically... In fact, the statistic "1 consistent gets" tells me that Oracle had to examine only one data block to get the answer, also can't do better than that. the statistic, "0 physical reads" tells me that the 1 data block used was already cached in Oracle's memory.
    the above is from Oracle 10g; autotrace is available back to at least 8i, but they've been adding information to the output with each release.
    If you have questions about sql_plus, check the forums at asktom.oracle.com or http://forums.oracle.com/forums/category.jspa?categoryID=18
    since sql*plus is not a JDBC thing...
    Oh, and sql*plus can also give you easier access to timing information, with "set timing on".

  • How to Get the required List Item values by using Where Clause

    I have two tables named "TAX_RULES","BILL"
    1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
    { While "Sub_Head_Code" field is unique,
    Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
    2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
    {While "Bill_ID" describes unique Bill Identification Number,
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
    I have design form for both tables.
    In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
    For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
    But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
    I have used WHERE clause but that is useless.
    Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
    <CODE>
    DECLARE
         rg_n1 VARCHAR2(40) :='TAX_ID';
         rg_idn1 RecordGroup;
         gc_idn1 GroupColumn;
         errcode NUMBER;
    BEGIN
         CLEAR_LIST('BILL.TAX_ID');
         rg_idn1 := Find_Group(rg_n1);
    IF      Id_Null(rg_idn1) then
              rg_idn1 := Create_Group(rg_n1);
         gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);     
              gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
         END IF;
         errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
         POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
    END;
    </CODE>

    In the Tax Rules table, you state:
    "Sub_Head_Code" field is unique
    In the Bill table, you state:
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
    If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
    It is not clear what it is you want to do.
    If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
    select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
    If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
    select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
    If this is not what you want, then clarify what it is you want to do. Don't say:
    "I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
    because it is not clear what tables you are referring to.

  • How can I use SQL to search for a pattern within a field?

    Hello, Frank, Solomon, ect
    I am now faced with this particular scenario, I've got the SQL to search through a field to find text within the field, but I have to know what it is before it can look for it.
    What I have to do is this:
    Search through a field, for a pattern, and I won't know what the data is I am looking for. Can this be done in SQL?
    For instance, Here is my SQL this far, I was helped allot in order to get to this point.
    select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('TABLE1', 'TABLE2')),
           xmltable (str columns result varchar2(10) path '.')
    When you execute the above SQL, you have to pass in a value. What I really need is to alter the above SQL, to make it search for a pattern that exist's within the text of the field itself.
    Like for instance, lets say the pattern I am looking for is this" xx-xxxxx-xxxx" and it's somewhere in a field.
    I need to alter this SQL to take this pattern and search through all the schemas and tables to look for this pattern match.
    Can be done?

    When you use something dynamically within a function or procedure, roles do not apply and privileges must be granted directly.  So, you need to grant select on dba_tab_cols directly.  If you want to do pattern matching then you should use regular expressions.  The following example grants the proper privileges and uses regexp_instr to find all values containing the pattern xxx-xxxx-xxxx, where /S is used for any non-space character.  I limited the tables in order to save time and output for the test, but you can eliminate that where clause.
    SYS@orcl> CREATE USER test IDENTIFIED BY test
      2  /
    User created.
    SYS@orcl> ALTER USER test QUOTA UNLIMITED ON USERS
      2  /
    User altered.
    SYS@orcl> GRANT CREATE SESSION, CREATE TABLE TO test
      2  /
    Grant succeeded.
    SYS@orcl> GRANT SELECT ON dba_tab_cols TO test
      2  /
    Grant succeeded.
    SYS@orcl> CONNECT test/test
    Connected.
    TEST@orcl> SET LINESIZE 90
    TEST@orcl> CREATE TABLE table1
      2    (tab1_col1  VARCHAR2(60))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table1 (tab1_col1) VALUES ('xxx-xxxx-xxxx')
      3  INTO table1 (tab1_col1) VALUES ('matching abc-defg-hijk data')
      4  INTO table1 (tab1_col1) VALUES ('other data')
      5  SELECT * FROM DUAL
      6  /
    3 rows created.
    TEST@orcl> CREATE TABLE table2
      2    (tab2_col2  VARCHAR2(30))
      3  /
    Table created.
    TEST@orcl> INSERT ALL
      2  INTO table2 (tab2_col2) VALUES ('this BCD-EFGH-IJKL too')
      3  INTO table2 (tab2_col2) VALUES ('something else')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    TEST@orcl> VAR search_string VARCHAR2(24)
    TEST@orcl> EXEC :search_string := '\S\S\S-\S\S\S\S-\S\S\S\S'
    PL/SQL procedure successfully completed.
    TEST@orcl> COLUMN "Searchword"     FORMAT A24
    TEST@orcl> COLUMN "Table"     FORMAT A6
    TEST@orcl> COLUMN "Column/Value" FORMAT A50
    TEST@orcl> SELECT DISTINCT SUBSTR (:search_string, 1, 24) "Searchword",
      2               SUBSTR (table_name, 1, 14) "Table",
      3               SUBSTR (t.column_value.getstringval (), 1, 50) "Column/Value"
      4  FROM   dba_tab_cols,
      5          TABLE
      6            (XMLSEQUENCE
      7           (DBMS_XMLGEN.GETXMLTYPE
      8              ( 'SELECT ' || column_name ||
      9               ' FROM ' || table_name ||
    10               ' WHERE REGEXP_INSTR
    11                     (UPPER (' || column_name || '),''' ||
    12                  UPPER (:search_string) || ''') > 0'
    13              ).extract ('ROWSET/ROW/*'))) t
    14  WHERE  table_name IN ('TABLE1', 'TABLE2')
    15  ORDER  BY "Table"
    16  /
    Searchword               Table  Column/Value
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>matching abc-defg-hijk data</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE1 <TAB1_COL1>xxx-xxxx-xxxx</TAB1_COL1>
    \S\S\S-\S\S\S\S-\S\S\S\S TABLE2 <TAB2_COL2>this BCD-EFGH-IJKL too</TAB2_COL2>
    3 rows selected.

  • Offset in where clause of for all entries

    Hi ,
    I need to fetch VBELN from VBKD table based on Purchase order no which is fetched from a Z-table.So I am using for all entries with where condition as VBKD-BSTKD_M = Ztable-PONumber  and fetching values from VBKD .But at times PO number in VBKD table can have additional things attached to it .
    Eg Ztable-PO number = 12345678 , VBKD-BSTKD_M = 12345678-001 so I need to ignore the '-001' part and still fetch data from VBKD.So how can I do that.
    Pls let me know if you have any ideas.
    Thanks in advance,
    Rajasekaran

    Hi ,
    We cannot use offset directly in where as it will result in syntax error as the field length for both fields have to match .In my case the length of both Ztable -PO number field and vbkd-bstkd_m are 35 characters.So cannot use offset directly in where clause of for all entries.
    Pls let me know if you have any other ideas.
    Thanks in advance,
    Rajsekaran

  • HT4436 My family has multiple iPhones.  Can we use one Apple ID for all of our phones?

    My family has multiple iPhones.  Can we use one Apple ID for all of our phones?

    If you use the same AppleID for iMessage and iCloud though, you will all be sharing the same message account and iCloud email account.  You can use a common AppleID for purchased content, but each create your own unique AppleID for iMessage and iCloud so you each have your own private accounts for those services.

  • Using If condition in For EACH Group

    Hi all,
    I want to use if condition in for-each-group. Basically my requirement is that i want to use dynamic grouping. There will be two groups and the upper group and lower group will be selected on the basis of a report parameter.
    I hope i made it clear enough. So please help me in this. Any ideas will be highly appreciable.
    Thanks and regards
    Naveed

    You can add a If condition filed after the for-each field
    for EG : <?if:ADDRESS_TYPE = 'Employee Address'?>
    and then add anothet field which has <?end if?>
    Hope this helps.
    Thanks,

  • HT1660 how can I use one single library for all users on the same laptop?

    how can I use one single library for all users on the same laptop?

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • Can I use the same itunes for my ipad and iphone?  Will the computer erase my other device information?

    Can I use the same itunes for my ipad and iphone on my computer?  Will the computer erase my other device information?

    The computer will not erase the information.  Each device will show up in iTunes as a separate device and you can control the information for each device through iTunes.

  • Can I use my Time Capsule for wifi parental control?

    Can I use my Time Capsule for WiFi parental control.  The objective first is to use a time clock to control internet access (completely on or off).  Second objective is to use the Time Capsule which is also the WiFi router for more selective internet control?  Anyone out there have any tips on making this work?  We have Time Warner cable feeding the house internet, which is then corrected to the 2Tb Time Capsule which also provides our WiFi.  Any information including other alternatives would be most appreciated.  Surely we are not the only parents on the planet with this issue.  Thanks very much!

    how do I get the Mac addresses for each device (this won't be a problem, I demand the device, check it, and then return it).
    What wireless devices are we looking at here?
    Most devices have the AirPort ID or MAC Address or Hardware Address printed on the back or bottom of the device
    Otherwise, you can learn the correct number by process of elimination. Turn off all wireless devices except your Mac computer....if it is connecting using wireless.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the Time Capsule icon
    Look for Wireless Clients and click on the numerical IP address that is displayed
    Another box will open
    Look for the Hardware Address. It will be displayed as xx : xx : xx : xx :xx : xx
    Write that down and note that it is your Mac.
    Now, connect another wireless device and repeat the sequence.  Click on the "other" listing that you see to find out more info about that device.  Write down the ID or Address and note what device it is. Then power it off.
    Do the same for each wireless device that you want to have limited access.
    Post back when you have all the info.

Maybe you are looking for

  • Use of client dependent tables

    Hi Gurus, I have read many threads on difference between client dependent and independent data/objects etc. But, someone tell me please, wheat exactly the 'Use or Advantage' of client dependent tables/data. Thanks in advance. V

  • Creative Zen 32GB won't turn on, won't reset, won't do anyth

    1. Make sure to state what player you have, and the firmware version.No idea the firmware version, the Zen won't turn on. I have the Creative Zen 32GB, bought in April, 2008. 2. What you have tried so far to solve the problem.Plugged it in using the

  • After Effects Multi-Core Benchmarks

    I have been doing some testing trying to figure out how fast after effects renders and how to help it render faster. So far i have been very dissapointed with the results. no matter how much money we spend buying the fastest systems we can i cant see

  • Animated themes bb curve 9300

    hello im a new bb user and i need  your help , i have tried downloading animated themes from app world and they wont work , they are compatible with my phone, they dont even show up where the themes are listed , i found the ones i downloaded in my fi

  • Inspection type - 04 and 03

    Hi. For a material produced in house I have maintained inspection type 03 (inprocess) and 04 (GR inspection). The MICs for In process inspection maintained them in Master Recipe and MICs for GR inspection maintained them in inspection plans. But when