Tag Query with prefixed _

Why do some results prefix the Tag with "_"?

Brian,
Since this response was sitting in your Inbox prior to your forum post I figured it was worth sharing to the rest of the SDN community:
When you see html results in the browser it is actually the xml results with a stylesheet to turn Rowsets/Rowset/Row into the pretty html table (http://localhost/Illuminator/StyleSheets/IllumRowsetHTML.xsl), and effectively from a query perspective you have two output builders: XML (for xml, html, csv) and binary (for applets). 
The '_' character you are seeing is only relevant in the XML output, since your column name (TagName) starts with a non-XML friendly character just like if it would start with a number or any other bogus character like the # sign.  If you test your query in XML and look in the output you will see that each data item in the Row nodes substitutes the characters with the underscore, but in the Column section you will see that the real tagname is preserved with the SourceName and Name attributes.
In the binary mode used by the applets this does not happen.
Regards,
Jeremy

Similar Messages

  • Dynamic Tag Query  with dynamic tag name.

    Hi,
    In our implementation we have 10+ users. Each one want to monitor only one production line ( eg. one tag value ) in the dashboard by default when they login.
    I was able to design this requirement CONCEPTUALLY but facing some trouble technically.
    Here is my issue.
    Tagname will be coming from one of the BLS Transaction input parameters (Transaction.Tagname). I am able to build tag query using xMII Tag Query block, able to configure repeater. Here is the spot where I was struck. While assigning tag value to XML Row
    i.e IlluminatorRow_0.Tagvalue = Repeater_0.Output{/Row/AssetUtil1}.
    In the above assignment link it requires a hardcoded tagname. In my case it will be dynamic. I tried different ways like
    1. IlluminatorRow_0.Tagvalue = Repeater_0.Output{/Row/@Transaction.Tagname}.
    2.IlluminatorRow_0.Tagvalue = Repeater_0.Output{/@Transaction.Tagname}.
    But no luck.
    Can someone help in how to do this dynamic tagname assignment.
    Thanks,
    Srinivasa.

    Hi Srinivas,
    another option is to use "Dynamic Links" which from your sample code is what you were trying to do. For this, the proper syntax is:
    Repeater_0.Output{/Row/#Transaction.Tagname#}
    Make sure that the tag name you pass to the historian is the same as the tag name returned by the historian as part of the data set, and make adjustments for that. For example, some historians escape non-alphanumeric characters when they process your request (e.g. passing "abc.def 12-rt" as the tag name can be returned from the historian as "ABC.DEF_12_RT", etc.).
    Hope this helps,
    Sascha

  • Tag Query with Special Characters in Tag Name not working

    Hello-
    We are on SAP xMII 12.0 sp8.6, connecting to Honeywell's PHD. We are doing Tag Queries, and all is working well, except when there are special characters in the Tag Name (+, /, \) We have attempted to do the Encoding of the tag name, such as as is returned from the function xmlencodename and also tried URL Encoding.
    Here is our tag which returns nothing.
    82TK1INV.OCTANE_R+M/2
    We have also tried these encoded versions, still to no avail:
    82TK1INV.OCTANE_R%2BM%2F2
    82TK1INV.OCTANER_M_2
    Any help on how to return the values with special characters in the tag name would be very helpful!
    thanks,
    Paul Mazeika

    To Chianti's question of why can't/shouldn't MII work with those bizarre tag names...
    Actually, there are a number of reasons:
    1) It's a poor design practice to use characters like that in tag names, regardless of the underlying system.  That type of information is best assigned to the tag description, not the tag name.  I've even seen idiots put leading spaces on tag names...figure that one out!
    2) MII uses XML extensively, and XML's syntax rules dictate what is and is not acceptable for XML element and attribute names, and many of these special characters are not permitted.
    3) Usage of characters in tags that also represent mathematical operators greatly complicate the parsing and processing of expressions that involve tag names
    In general, it reminds of the story of the guy who walks into the doctor, bangs his fist against a specific spot on his head, and says "Doc, it hurts when I do this", to which the doctor responds, "so don't do that". 
    So, Don't Do That.

  • Tag Query History mode returning too many rows of data

    I am running a Tag Query from HQ to a plant site and want to limit the amount of data that returns to the minimum required to display trends on a chart.  The minimum required is subjective, but will be somewhere between 22 and 169 data points for a weeks data.  Testing and viewing the result is needed to determine what is an acceptable minimum. 
    I build a Tag Query with a single tag and set it to History Mode.  I set a seven day period going midnight to midnight.  And I set the row count to 22.  When I execute the query it returns 22 data points.  But when I go to visualization, I get 565 datapoints.  So obviously that is not what I want as I want a very slim dataset coming back from the IP21 server (to minimize the load on the pipe). 
    Any suggestions?

    Hi Michael,
    it looks to me like you have enabled the "Use Screen Resolution" option in your display template or in the applet HTML. Setting this option makes the display template fetch as many rows as there are pixels in the chart area. Like setting a rowcount in the applet HTML as a param, this will override any rowcount limitations you have set at the Query Template level...
    Hope this helps,
    Sascha

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Issue in mapping.. Source message expect with prefix ns0 in input message!

    Issue in mapping.. Source message expect with prefix ns0 in input message
    Hi All,
    I used the XSD structure which I got from partner which starts like below.
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xxxx.com/DirectSales/CustomerData" xmlns:prodata="urn:schemas-progress-com:xml-prodata:0001" xmlns="">
    <xsd:element name="CustomerRequest" prodata:proDataSet="true">
    I'm receiving the messages through SOAP adapter and the message looks like below.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Technical Routing --> <CustomerRequest xmlns='http://XXXX.com/DirectSales/CustomerData' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SE='http://schemas.xmlsoap.org/soap/encoding/'>
    The message is failing during mapping. When i checked in message mapping, I found that the input source message is expecting with prefix "ns0" like <ns0:CustomerRequest...
    how I can solve this issue? Is there anyway I can add the prefix "ns0" before it comes to mapping step.?
    Thanks
    Deepthi

    Hi Guys,
    I tried to use the below paramter.
    anonymizer.acceptNamespaces         'http://XXXX.com/DirectSales/CustomerData  ns0
    The ns0 is coming in all the tags including segments and fields. I just want ns0 to come only at the root level ie <ns0:customerReq..>
    it is coming like below...
    - <ns0:CustomerRequest xmlns:ns0="http://XXXXXX.com/DirectSales/CustomerData">
    - <ns0:ttCustomer>
      <ns0:branch-num>1424</ns0:branch-num>
      <ns0:cust-num>121</ns0:cust-num>
      <ns0:contact-code>3</ns0:contact-code> 
       </ns0:ttCustomer>
      </ns0:CustomerRequest>
    I want the message to come as
    - <ns0:CustomerRequest xmlns:ns0="http://XXXXXX.com/DirectSales/CustomerData">
    - <ttCustomer>
      <branch-num>1424</branch-num>
      <cust-num>121</cust-num>
      <contact-code>3</contact-code> 
       </ttCustomer>
      </CustomerRequest>
    Kindly help me with the paramater value  to be passed for anonymizer.acceptNamespaces.
    Thanks
    Deepthi

  • How to pass 100+ tags in a single sql/tag query

    <b>In my current application I have to pass 180+ tags in a single query to retrieve data from iHistorian.
    I want to know how to pass more thatn 100 tags in a single SQL or TAG Query using OLEDB or UDC connectors.
    If anybody has done it in the past ,please share with me and also let me know how to do it</b>

    Currently you can only query a maximum of 128 tags, this is a hard limit and may be changed in future releases of xMII, but < 11.5 (im fairly sure 12 also) all have the limit of 128.
    As for iHistorian with the OLEDB UDS, you can write a query that would return over 128 queries becasue this is an input limitation on the UDSs. (PLEASE DON"T ASK US HOW TO WRITE iHistorian QUERIES... we aren't experts in iHistorian).
    Please note that though you can query over 128 tags, the performance may not be what you expect... This may take a very long time to return.
    Martin

  • Issue with SQL Query with Presentation Variable as Data Source in BI Publisher

    Hello All
    I have an issue with creating BIP report based on OBIEE reports which is done using direct SQL. There is this one report in OBIEE dashboard, which is written using direct SQL. To create the pixel perfect version of this report, I am creating BIP data model using SQL Query as data source. The physical query that is used to create OBIEE report has several presentation variables in its where clause.
    select TILE4,max(APPTS), 'Top Count' from
    SELECT c5 as division,nvl(DECODE (C2,0,0,(c1/c2)*100),0) AS APPTS,NTILE (4) OVER ( ORDER BY nvl(DECODE (C2,0,0,(c1/c2)*100),0))  AS TILE4,
    c4 as dept,c6 as month FROM 
    select sum(case  when T6736.TYPE = 'ATM' then T7608.COUNT end ) as c1,
         sum(case  when T6736.TYPE in ('Call Center', 'LSM') then T7608.CONFIRMED_COUNT end ) as c2,
         T802.NAME_LEVEL_6 as c3,
         T802.NAME_LEVEL_1 as c4,
         T6172.CALENDARMONTHNAMEANDYEAR as c5,
         T6172.CALENDARMONTHNUMBERINYEAR as c6,
         T802.DEPT_CODE as c7
    from
         DW_date_DIM T6736 /* z_dim_date */ ,
         DW_MONTH_DIM T6172 /* z_dim_month */ ,
         DW_GEOS_DIM T802 /* z_dim_dept_geo_hierarchy */ ,
         DW_Count_MONTH_AGG T7608 /* z_fact_Count_month_agg */
    where  ( T802.DEpt_CODE = T7608.DEPT_CODE and T802.NAME_LEVEL_1 =  '@{PV_D}{RSD}' 
    and T802.CALENDARMONTHNAMEANDYEAR = 'July 2013'
    and T6172.MONTH_KEY = T7608.MONTH_KEY and T6736.DATE_KEY = T7608.DATE_KEY
    and (T6172.CALENDARMONTHNUMBERINYEAR between substr('@{Month_Start}',0,6)  and substr('@{Month_END}',8,13))
    and (T6736.TYPE in ('Call Center', 'LSM')) )
    group by T802.DEPT_CODE, T802.NAME_LEVEL_6, T802.NAME_LEVEL_1, T6172.CALENDARMONTHNAMEANDYEAR, T6172.CALENDARMONTHNUMBERINYEAR
    order by c4, c3, c6, c7, c5
    ))where tile4=3 group by tile4
    When I try to view data after creating the data set, I get the following error:
    Failed to load XML
    XML Parsing Error: mismatched tag. Expected: . Location: http://172.20.17.142:9704/xmlpserver/servlet/xdo Line Number 2, Column 580:
    Now when I remove those Presention variables (@{PV1}, @{PV2}) in the query with some hard coded values, it is working fine.
    So I know it is the PV that's causing this error.
    How can I work around it?
    There is no way to create equivalent report without using the direct sql..
    Thanks in advance

    I have found a solution to this problem after some more investigation. PowerQuery does not support to use SQL statement as source for Teradata (possibly same for other sources as well). This is "by design" according to Microsoft. Hence the problem
    is not because different PowerQuery versions as mentioned above. When designing the query in PowerQuery in Excel make sure to use the interface/navigation to create the query/select tables and NOT a SQL statement. The SQL statement as source works fine on
    a client machine but not when scheduling it in Power BI in the cloud. I would like to see that the functionality within PowerQuery and Excel should be the same as in Power BI in the cloud. And at least when there is a difference it would be nice with documentation
    or more descriptive errors.
    //Jonas 

  • Select query with UNION clause in database adapter

    Friends,
    I have got a SQL query with two UNION clause withing it. like
    select a,b,c
    from a
    union
    select a,b,c
    from b
    The schema generated is like below in sequence
    <element>a</element>
    <element>b</element>
    <element>c</element>
    <element>a</element>
    <element>b</element>
    <element>c</element>
    So, the columns from different select queries joined with UNION clause are all appeared in schema instead of the distinct columns.
    Is there any way around to solve this issue ? or will need to with DB function/procedure.

    I think I know what you are saying but your example doesn't make sense, your SQL should produce something like
    I had to change a, b, c with elementA, elementB, elementC as a and b are reserved html tags.
    <elementA>DateA</elementA>
    <elementB>DataB</elementB>
    <elementC>DataC</elementC>
    ...What is the result of the query when you run it in SQLPlus? Is it what you expect?
    cheers
    James

  • Tag Query error when assigning mode in Link Editor

    Hi,
    I am receiving the following error when I run a transaction that contains a Tag query.  In my transaction I have set the tag query mode to be defined by a local property via the link editor.  Then when I execute the transaction I get the following error:
    "[ERROR] [TAG_QUERY_WRITE_TAG]com.sap.xmii.Illuminator.logging.LHException: Mode parameter was not found or is malformed"
    I am on version 12.1.8 Build(43).
    I import the project into MII 12.1.4 Build(53) and the transaction works as expected.
    In the new verson of MII is there a bug utilizing the link editor to set mode?  Or is there a specific way it wants the mode linked. (e.g. specific case)
    Additional details:
    I am trying to use the CurrentWrite mode.  I have tried setting Current mode via the link editor and that isn't working either. 
    Any suggestions?
    Thanks,
    Justin

    Hi Mike,
    Please correct me if I understand the logic incorrectly.  But here is what I am thinking....
    I have configured my transaction to have this flow:
    String_List_To_XML_Sequence --> Repeater_TagValues  -->  TAG_QUERY_WRITE_TAG
    The String_List_To_XML_Sequence would contain String_List_To_XML_Parser_TagValues & String_List_To_XML_Parser_TagNames.
    With this flow the logic would say that I will be running a seperate tag query for each tag value.  So if I have 100 tag values that I want to send, I will run 100 tag queries.  This doesn't seem the most efficient.  Also if this is how you were thinking I would configure the transaction then I could use the following links:
    Target Xpath: TAG_QUERY_WRITE_TAG.TagValue.1
    Expression: String_List_To_XML_Parser_TagValues.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    Target Xpath: TAG_QUERY_WRITE_TAG.TagName.1
    Expression: String_List_To_XML_Parser_TagNames.Output{/Rowsets/Rowset/Row[#Repeater_TagInput.CurrentItem#]/Item}
    With this configuration updating 10 tags takes 2 seconds:
    [INFO] Statistics [Load = 35 ms msec, Parse = 35 ms, Execution = 2015 ms, Total = 2067 ms]
    With my old configuration updating 10 tags took 700 ms. (original transaction on 12.1.4 Build (53)
    [INFO] Statistics [Load = 11.137 msec, Parse = 224.113 msec, Execution = 451.78 msec, Total = 736.62 msec]
    Please let me know if I interpreted your thoughts incorrectly.
    If there is a way to utilize only 1 Tag Query, then I am not sure how the transaction flow should be configured.
    Thanks for your time,
    Justin
    Edited by: Justin M Brown on Jul 14, 2011 7:29 PM
    Edited by: Justin M Brown on Jul 14, 2011 7:33 PM

  • Custom Tags starting with $: lots of problems

    I'm building an extension for MovableType template tags.
    Those tags can be delimited in several ways: <MTNameOfTheTag>
    or <$MTNameOfTheTag> or even <$MTNameOfTheTag$>. Since
    the dollar sign is not allowed as tag name, i put a
    prefix="&lt;$" in tag definition, but now i have some problems:
    1. even if in tag chooser i can see the dollar-prefixed tags,
    i cannot see them in code hints (I mean "automatic" code hints,
    those floating menus automatically made for every tag/every
    attribute/every enumerated attriboption in library).
    2. I tried to manually code tags in codehints.xml file with
    the "&lt;$ pattern (so i can change the icon associated to my
    custom tags, too. That's will be very elegant) but I loose "child"
    codehints menus: the first codehints menu (the one i manually made)
    comes up, but those for attributes and attributes values don't.
    3. With the solution in point 2 not only i loose "automatic"
    codehints, but i have to write THREE files for every tag
    (taglibrary, codehins, third party tags file). Lot of time :/
    4. Dollar signs, in both start and end, are NOT part of the
    name, but part of the tag, like a prefix or a suffix. With an
    attribute i should have:
    <$MTBlogName donald="goofie"$>
    and not:
    <$NTBlogName$ donald="goofie">
    as actually i have
    so, as i said...a lot of problems! i hope someone can help
    me...its really an hard sunday, today! :/
    tnx in advance

    I think you might be moving into creating your own server
    model.
    Just a thought.

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi
    I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have:
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    And OC4J 9.0.3 is compatible with tlib version 1.0 and jsp version 1.2. When I run the web app I get:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    Any ideas?

    Hi
    Thanks for the reply.
    I tried it and I get the same error:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.

  • Query with union

    Hi,
    I have three table:
    Candidates: (candidate_id primary key)
    Purhcase_orders: (Po_number primary key)
    Bids: (bid_number primary key)
    Just wanted to retrieve candidate information like candidate_id, first_name etc, along with count of purchase orders issued against this candidate and count of bid_number.
    For that I have written below query:
    query - 1:
    SELECT CANDIDATE_ID,
    INITCAP (first_name) FIRST_NAME,
    +(SELECT COUNT (DISTINCT bid_number)+
    FROM bids
    WHERE BIDS.CANDIDATE_ID = cand.candidate_id)
    BID_COUNT,
    +(SELECT COUNT (DISTINCT po_number)+
    FROM purchase_orders po
    WHERE PO.CONTRACTEE_ID = cand.candidate_id)
    PO_COUNT,
    +'Y' match_flag,+
    DECODE ( (SELECT candidate_id
    FROM v_ineligible_candidates vic
    WHERE VIC.CANDIDATE_ID = cand.candidate_id),
    NULL, 'N',
    +'Y')+
    INELIGIBLE_FLAG
    FROM candidates cand
    Based on business requirement, need to create another set of query (query -2) same like above. In that we have some decode statements to calculate match_flag, then need to perform UNION operation between query -1 and query -2.
    have around 130563 number of rows in candidates table.
    Individually both queries are taking 500 msec.
    But when I have used union, it didnt give result for atleast 60 sec. Then I cancelled execution.
    Execution plan for the final query with UNION: (final cost)
    Cost: 2,873  Bytes: 9,130,170  Cardinality: 260,862                
    Please help me in this issue.
    Why its taking that much time in union.
    Please correct my mistake and suggest me in this query.
    UNION ALL is running but not UNION.
    Thanks in advance

    Please post complete Explain Plans.
    To get detailed information of Explain Plan use
    explain plan for
    your_query;
    select *
      from table(dbms_xplan.display(null, null, 'ALL'));Post it alongwith below details between {noformat}{noformat} (exactly as specified) tags to preserve formatting and ease of understanding.
    On your requirement,
    Using UNIONALL you will get two set of rows, with UNION you might get a single row if your MATCH_FLAG are same for both queries. Use of either, has to meet your requirements than to meet your performance. If it is Business Acceptable, then look for performance and tuning.
    If you could do the folllowing, it might be helpful for you.
    1. Post the Sample table structure (Table information of Candidates should suffice) in a Create Table/With Sub-Query clause.
    2. Sample Data in Insert Into/With Sub-Query format.
    3. Expected Outcome based on Sample data
    4. The Explain Plan of your Queries as requested above.
    Reason of asking these details are, there might be a way to avoid Hitting the table Twice and avoid use of UNION/UNIONALL clauses.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Splitting a query with modulo

    Hello
    I'm stuck in a problem which I started in an other post.
    Unfortunately I didn't really get the answers which satisfy me.
    Even though there were good inputs.
    Assume we have a query with 9 results and I would like to
    build DIVs containing 2 results each. Every DIV is set to 'display:
    none;', so nothing is displayed on a page for the moment!
    Somewhere below these DIVs I place back and forward arrows in
    DIVs to navigate through the DIVs above without reloading the page
    (!). I managed to build the sets of DIVs an giving them an ID (see
    code). Every ID appears twice, once in the DIV containg the 2
    results and once in the DIV containing the navigation arrows. This
    because I want to display the arrows (always a set of 2) depending
    on where I am staying in navigation. Means, when I display the
    first DIV there is no option to go backwards, so the back arrow is
    inactive. If you go one step forward you can navigate backwards and
    forwards so both arrows have to be active. At the very end you
    cannot navigate forward any longer so I would like to display a
    forward button which I inactive (and a backwards button which is
    active).
    The whole displaying should be controled by JavaScript.
    It seems that I have several problems. First the Javascript
    isn't working properly - I couldn't figure out why? And the Mozilla
    shows all DIVs. And then the whole navigation through the sets
    doesn't work the way it should. I prepared the entire code (see
    below). You can add it to an empty cfm file and it should work - at
    least whats working for the moment ;-)
    I'm really thankful for a solution.

    Hi,
    You should have a look at the the attributes startrow="" and
    maxrows="" of the output tag.
    Based on the Rowcount attribute of the query you can output
    the first half or the second half of the query result with it (or
    divide it into more areas if necessary).
    From a design perspective is your goal not ideal for most
    applications.
    The reason why people usually implement a 1ToN interface like
    you are planning is because you have a huge result set (as example
    1000s of users). In this case you would with your approach always
    render the HTML for 1000 altough the webuser would only look at a
    small portion of it. In this case it would be far better to only
    render the HTML for the accounts the user wants to see right now
    (again using startrow / maxrows), and really create a new page for
    the next / previous set of accounts. This way you only have to
    render a small HTML page, that gets returned to the user faster,
    and makes him happier.
    (If you really only have a small number of records your
    approach would work though, but since you are still learning I
    though to mention it ;-)
    Cheers,
    fober

  • Tag query - Rowcount Property

    Hi,
    We are using SAP MII 12.1.5 ( build 83).
    We have been connecting to a PI historian to get data and performing some calculations.
    Since the client gives more important on the accuracy of data, we are using the history event mode.
    ( With history event , we could not get the results as expected)
    While querying a particular tag, the value is not as expected.
    After doing all the testing, We found out the For the particular period PI has some where around 18000 rows. and we are only getting 9999 rows since we have specified this in the tag query row count.
    In the transaction I tried to increase the rowcount to 20000. It is not working.
    The maximum count is 10000. After that the query gives unknown error Java LH exception.
    Is there a limitation on the rowcount property?
    If we fix the row count for a certain limit and the query returns more than those number of rows,  how to get all data?
    I am sure handling these huge number of rows is not a very good thing to do. But the algorithm to calculate the end result requires each and every data as registered in PI.
    Any input is appreciated.
    Thanks in Advance,
    Kishore kumar P S

    Hi Mike,
    We have initially told about the performance issues if we go with this approach.
    But once we have shown the demo last week, they agreed with the modified approach.
    Now we are using the Statistics with TOT.  Still the totalizer value is not taking effect.
    As I know from the help docs, the totalizer factor is used to change the from one unit to another unit.
    the help Doc says
    "The area under the curve (effectively a "totalizer" value) can be calculated by multiplying the time-weighted average by the width of the time interval in seconds.  However, quite often, the instrument or measurement is in different units (perhaps gallons per minute versus per second), and the TotalizerFactor parameter can be used to perform the correction."
    But there is no effect on the totalizer value. There is one more point in totalizer value is depend upon the connector. We are using the UDC connector. Currently I am not getting anything on this connector type.
    Any inputs will be appreciated.
    Thanks & Regards,
    Kishore kumar P S

Maybe you are looking for