Access the Name and Value of a StationGlo​bals container programati​cally

Hello,
I am having some trouble trying to programmatically write the contents of a container into my HTML report header. The container contains a series of strings and numbers. These are saved into StaionGlobals.
Note that I am performing all of these operations in a statment step inside the sequence editor of TestStand
I used the following method to access the correct property, which sits inside a for loop. Now this seems to work fine as Locals.PropertyObj contains the element which I wish to access. In the following Locals.PropertyObj is an object. TestSetup is the name of my setup information container
Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
I can access the Name of the parameter simply by using the following code (where Locals.Name is a string):
Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)
However when I try to access the actual value of the parameter I get an error or the wrong information. The following line gives me back the value "PropertyObject, IID = {8D87....}" which is not the value I am trying to get to.
Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
I must be doing something wrong, and have tried various methods to do this but cannot get my head around the problem. I tried to use the following also, but it resulted in an error:
Locals.PropertyObj.AsPropertyObject.GetFormattedValue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")
Note that the following line works fine:
(Locals.PropertyObj.AsPropertyObject).Name
Also can you tell me why the lookup string needs to be defined in Locals.PropertyObj.AsPropertyObject.GetValueString​(), is there a way to not require the lookup string as you are already have the correct property, and just the value is needed to be gotten.
One last thing, in Evaluate() how do I make it work with dots, for example the following line  (another attempt to get the value) did not work due to the presence of the . character 
Evaluate("StationGlobals.TestSetup." + (Locals.PropertyObj.AsPropertyObject).Name)
Many thanks in advance of your response,
Ben Lawler
ps. hope that I am not being stupid and missed something very obvious

Ben,
Just a few comments;
[Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
This should give you a PropertyObject for the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
[Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)]
This should give you the name of the 1st subProperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
[Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
This is going to return the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0 as a PropertyObject reference
and Locals.Val should be an ActiveX Reference type which I am guessing it isn't.
[Locals.PropertyObj.AsPropertyObject.GetFormattedV​alue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")]
I think this should be Locals.PropertyObj.GetFormattedValue("", 0, "", False, ""), you dont need to specify the lookup string because you have obtained a reference to the actual sub-PropertyObject.
and therefore
Locals.Val = Locals.PropertyObj.GetFormattedValue("", 0, "", False, "")
should give you the value of the 1st subproperty of StationGlobals.TestSetup if Locals.PropertyObj was obtained as above.
I will try to check out your sequencefile later when I have access to TestStand 4.x.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • How to get the name and value of an attribute on a node/element that is not a child

    Hello,
    Can someone shed some wisdom on how I can compare 2 xml nodes for differences.
    My main challenge is I need to use the attributes/values of 'ProductDescription' and 'Features' as 'key' to identify the same node in
    another doc with the same layout, but different content.
    I am having trouble getting the name of the attribute on the node, 'ProductDescription' and 'Features'.  I can only seem to get the node names, but not the attributes on the node.  I need the name, because it can be different from doc to doc, so
    I can't hardcode this.
    Can someone please help with how to retrieve an attribute name/value on a node that is not a child.  Here's an example of what
    my xml looks like:
    DECLARE
    @myDoc1 xml
    ,@mydoc2 xml
    DECLARE
    @ProdID int
    SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <features featureID = "2" featureName = "seat">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>
    SET @myDoc2 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>2 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <features featureID = "2" featureName = "wheel">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>
    I need to compare the attributes of 'ProductDescription' and 'Features' from @mydoc1 against @mydoc2 to see if they are the same based on those 2 nodes first.  If they are, then i want to show the difference in the child elements. 
    This will eventually be an outer join to give me the differences betw the 2 docs based on those key values (node attributes).
    I used node('//*') for the path, and value('local-name(../.)', 'varchar(50)') as element
    ,value('.[not(@xsi:nil = "true")]','VARCHAR(255)') AS new_value
    ...etc...
    but that only gives me the node names, and the child elements.  It does not give me back the attribute names and values from the node itself.
    Thanks in advance for your help.
    cee

    Are you looking for something like this:
    DECLARE @myDoc1 xml
    SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
    <Features  featureID  = "1" featureName = "body">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    <Features featureID = "2" featureName = "seat">
      <Warranty>1 year parts and labor</Warranty>
      <Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
    </Features>
    </ProductDescription>'
    SELECT T.c.value('local-name(.)', 'nvarchar(50)') AS name,
           T.c.value('.', 'nvarchar(50)')  AS value
    FROM   @myDoc1.nodes('ProductDescription/@*') AS T(c)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Send name and value of control to subvi

    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    Running LabVIEW 2009 32bit SP1 on Windows 7 64Bit
    Solved!
    Go to Solution.

    tombech wrote:
    Hi all
    I am trying to send the names and values of controls to a subvi. 
    I know that I can extract the name and value of the control using a property node, but I was looking for a way to make is easy to use for the programmer.
    I am thinking of some kind of bundle function, it saves the name and value of the control, but I would like the programmer to be able to connect a random number
    of controls to this subvi without having to specify the number of controls anywer.
    I know there is configuration file stuff in labview, but it looks a bit more complex then what I want to do.
    Also i know that I can use the OpenG toolkit, but I'll rather not use any add-ons to labview, as this VI might be running on many different computers.
    Hope I made my problem clear enough! 
    Have a nice day
    Regards
    Tommy
    I am not sure what you have in mind Tommy but lets rule out the rediculous.
    You can find a Nugget I wrote here that explains how I managed to write an Save/Restore function that will automatically adapt to a type-def'd cluster. THat Nugget include my original source code as well as a full description of what where why and how.
    I have used that code in multiple applications and it has demonstrated that it works.
    No not all data types are supported! I left that as an exercise for the reader.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Additional Results Custom Step using Variables in Name and Value to Log expressions?

    I am trying to create a Custom Step Type for logging additional results - requiring a single Name and Value data pair included in the step.
    I want to pass the name and value data in using two specific variables.
    This functionality can of course be explicitly coded on a test step without problem, but I can't find a way to create a custom test step which inserts such a step i.e. automatically inserting the correct variable names into Name and Value to Log fields.
    Any ideas how to accomplish this? I don't want the custom step users to have to type in the variable names every time they use it.
    I am using TestStand 4.1.1
    Message Edited by CIM1 on 04-20-2009 07:26 AM

    Hi CIM1,
    There are a few ways of doing this.
    The simplest one would be to configure the expression in the Pre-Expression or Post-Expression (depending on whether you would like the Step Type to use the value in the variables or write the value to the variables) and then from here you can lock away the expressions from being edited. The caveat with this method is that you are obviously restricing the Pre/Post-Expressions for the step type. 
    Another Method would be to code some code modules to Write to/Read from the Variables and then calling these in the Steps Pre-Step SubStep or Post-Step Substep. The advantages of this method would be that you can search for the Variable, and if the variable is not present, you could create it before writing to it.
    Hope this Helps.
    Best Regards,
    Steve H 

  • Get the attributes NAME and VALUE from an XML

    I really love this forum :)
    I load an XML an populate a Tree, from which I start to drag
    items.
    the xml looks like this:
    <myTag attrName="attrValue"
    otherAttrName="otherAttrValue"/>
    var ds:DragSource = event.dragSource;
    var var1:String =(event.dragInitiator as
    Tree).value.@attrName;
    -> the var1 variable has now: "attrValue"
    my question is.. how can I get all the attributes' names? in
    this example: attrName and otherAttrName (suppose I don't know the
    structure of that xml node)
    what about attributes values?
    thank you!

    The snippet below takes an xml node(nodeCur), loops over the
    attributes list and builds an array that contains the attribute
    name and value for each attribute. It comes from a sample app that
    allows you to edit an xml file.
    Sorry that the forum will remove the formatting
    var aDPAttributes:Array = new Array();
    var xlAttributes:XMLList = nodeCur.@*;
    var attribute:Attribute;
    for ( var i:int = 0; i < xlAttributes.length(); i++) {
    aDPAttributes.push({name:xlAttributes [ i ]
    .name(),value:xlAttributes [ i ] });
    dgAttributes.dataProvider = aDPAttributes; //set the property
    sheet dataProvider
    Tracy

  • How to pass tag name and value dynamically in the output of PCo notification?

    Hi,
    I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
    Thanks in advance.
    Regards,
    Suman

    Hi Suman/Jeedesh,
    As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
    For above issue, My suggestion
    1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
    2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
    3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
    4. And in the mean time, send those Tag details vie mail trigger or as per requirement
    Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
    Hope it might solve your problem
    Regards,
    Praveen Reddy

  • Help in retrieving the element attribute name and value..

    Hi have to retrieve the attribute name and value from the element.....
    requirement is like this
    <ws:GetRightNowProductViewByDivisionResponse xmlns:ws="http://ws.sage.co.uk/">
    <ws:GetRightNowProductViewByDivisionResult ProductID=" " RightNowProductView=""/>
    </ws:GetRightNowProductViewByDivisionResponse>
    i should get all the element attbutes names as attributes in above mentioned format ..using xquery...
    here is the respone ....
    <sage:sageRequestResponse xmlns:sage="http://www.sage.com">
    <env:EaiEnvelope xmlns:env="http://www.sage.com/Envelope">
    <env:Domain>string</env:Domain>
    <env:Service>RightNowBroker</env:Service>
    <env:UserId>string</env:UserId>
    <env:OperationName>GetRightNowProductViewByDivision</env:OperationName>
    <env:Payload>
    <ws:GetRightNowProductViewByDivisionResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.sage.co.uk/">
    <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="RightNowProductView" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="RightNowProductView">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ProductId" type="xs:short"/>
    <xs:element name="Product" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
    <xs:selector xpath=".//RightNowProductView"/>
    <xs:field xpath="ProductId"/>
    </xs:unique>
    </xs:element>
    </xs:schema>
    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"/>
    </ws:GetRightNowProductViewByDivisionResult>
    </env:Payload>
    </env:EaiEnvelope>
    </sage:sageRequestResponse>

    Hi
    Just as an aside to the comments above, a scenario we see occasionally is where a desk provides an internal function (e.g. a helpdesk) and you really just want to get the name display (as seen on the handsets) onto the CAD display.
    You can do this by  doing a reverse lookup over HTTP against CUCM. There are a number of posts around, these should get you started :
    https://supportforums.cisco.com/thread/2065114
    https://supportforums.cisco.com/message/3024617
    A couple of notes:
    - It looks up against the directory, NOT the actual calling line. So you can add stuff to the directory to get external callers to show up by name, but should expect the unexpected when you have shared lines (e.g. multipel directory entries with one tel number for whatever reason)
    - If you want to do different lookups (i.e. get names back in a different format, get the actual line display name from CUCM, or lookup elsewhere) then you would need to either:
    1) Do it via SOAP or another technology from the UCCX script engine
    2) Put in a small external web service to do the lookups and allow UCCX to query via simple HTTP
    3) Use a DB for the numbers so you can read/write to it from UCCX and regularly update the data from wherever you like
    Regards
    Aaron HarrisonPrincipal Engineer at Logicalis UK
    Please rate helpful posts...

  • What is the key column name and value column name in JDBC Adapter parameter

    Hi
    Can any one please tell me what is the Key Column Name and Key Column Value in JDBC adatper parameters. If i dont mention those parameters i am getting the following error
    <b> Value missing for mandatory configuration attribute tableEOColumnNameId</b>
    Please help me
    Best Regards
    Ravi Shankar B

    Hi
    I am doing DataBase Lookup in XI
    First i have created a  Table in Database( CheckUser) which has two fields UserName and PhoneNumber and then i have created
    I have created one Communication Channel For Reciever Adapter .
    I have given the parameters like this
    JDBC Driver : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection : jdbc:microsoft:sqlserver://10.7.1.43:1433;DatabaseName=Ravi;
    UserName.... sa
    password.... sa
    persistence : Database
    Database Table Name : CheckUser
    Key column name and Value column name i left blank and activated
    and then
    I have created
    Data Types : Source ...... UserName
                      Destination.... PhoneNumber
    Message Types
    Message Interfaces
    In Message Mapping
                  I have created one User Defined function DBProcessing_SpecialAPI().This method will get the data from the database....
    In this function i have written the following code
       //write your code here
    String query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    query = "select Password from CheckUser where UserName = ' " +UserName[0]+ " '  ";
    try {
         channel = LookupService.getChannel("Ravi","CC_JDBC");
         accessor = LookupService.getDataBaseAccessor(channel);
         resultSet = accessor.execute(query);
         for(Iterator rows = resultSet.getRows();rows.hasNext();){
              Map  rowMap = (Map)rows.next();
              result.addValue((String)rowMap.get("Password"));
    catch(Exception e){
         result.addValue(e.getMessage());
    finally{
         try{
              if(accessor != null)
                   accessor.close();
         }catch(Exception e){
              result.addValue(e.getMessage());
    And the i have mapped like this
    UserName -
    > DBProcessing_SpecialAPI----
    >PhoneNumber
    when i am testing this mapping i am getting the following error
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Dest_JDBC_MT xmlns:ns0="http://filetofilescenario.com/ilg"><phoneNumber>Plain exception:Problem when calling an adapter by using communication channel CC_JDBC (Party: , Service: Ravi, Object ID: c360bc139a403293afbc49d5c46e4478) Check whether the communication channel exists in the Integration Directory; also check the cache notifications for the instance Integration Server (central Adapter-Engine) Channel object with Id Channel:c360bc139a403293afbc49d5c46e4478 not available in CPA Cache.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel CC_JDBC (Party: , Service: Ravi, Object ID: c360bc139a403293afbc49d5c46e4478) Check whether the communication channel exists in the Integration Directory; also check the cache notifications for the instance Integration Server (central Adapter-Engine) Channel object with Id Channel:c360bc139a403293afbc49d5c46e4478 not available in CPA Cache.
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.<init>(AdapterProxyLocal.java:61)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.getProxy(SystemAccessorInternal.java:98)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.<init>(SystemAccessorInternal.java:38)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.getConnection(SystemAccessorHmiServer.java:270)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:70)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    </phoneNumber></ns0:Dest_JDBC_MT>
    In RWB i have checked the status of JDBC driver its showing the following error
    <b>Value missing for mandatory configuration attribute tableEOColumnNameId</b>
    Best Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B

  • Access the styles and defined names of an excel sheet in apps for office

    Hi Everyone,
    Can you please let me know how to access the styles and defined names of an excel sheet in apps for office ?
    Technologies/language  used:office JS ,Jquery and apps for office
    any help in this is highly appreciated
    Thanks!!
    Santosh Sutar 

    Hi,
    I’m not sure if I understand your question correctly, so please correct me if I have any misunderstandings.
    For the defined names, I assume you mean the named range. If so, you can create the binding to the named range through
    Bindings.addFromNamedItemAsync method.
    For the styles, I think the article below may give you some help.
    How to: Format tables in apps for Excel
    By the way, there are no methods to iterate the styles and named range through the current Office JavaScript API.
    If this is a feature you want to include in future versions of Office JavaScript API, please submit a feedback to
    Office Development Platform User Voice.
    Regards,
    Jeffrey
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Query to get parameter name and value after ran the conccurent program

    Hi All,
    Query to get the parameter name and value for completed concurrent program using the request id. can any one help me in this regard.
    Thanks,
    Red.

    Red,
    I have tried the same query and it works properly here.
    I have submitted "Purge Signon Audit data" concurrent program with "Audit Date" parameter set to 01-06-2009, and here is the query output:
    SQL> select request_id, phase_code, status_code,
    argument_text, argument1
    from fnd_concurrent_requests
    where request_id = '739664';
    REQUEST_ID P S ARGUMENT_TEXT        ARGUMENT1
        739664 C C 2009/06/01 00:00:00  2009/06/01 00:00:00Regards,
    Hussein

  • How to get all property names and values of an bean instance at runtime?

    How can I get all property names and values of an bean instance at runtime?
    (The class of the bean instance is dynamic and I can not know before I write the code .)

    Look at Class. It has a way to get at all public methods and attributes.
    If you need to get to private attributes you can do what the Introspector does and expect the methods to follow the Bean pattern and pull the attributes out based upon that. Privates are all hidden from direct access but through the Bean Pattern they can be figured out.

  • Using an index to access the last n values of a certain combination

    I have a large table of the following form:
    Name Typ
    ID NUMBER
    M_DATE DATE
    M_LOC NUMBER
    M_ARTICLE VARCHAR2(30)
    M_TYPE VARCHAR2(30)
    M_MEASURE VARCHAR2(50)
    VALUE NUMBER
    In this table there is only a small number of different locations, articles, types and maesures but a large number of m_date values.
    I want to access the last 10 values for a certain combination of locations, articles, types and measures.
    I have an index
    create index i_res_2 on results (m_loc, m_article, m_type, m_measure, m_date);
    In my opinion it should be possible to access the last 10 values directly by this index, but
    when I do my select in the following way it seems to me that first all datasets with the same
    locations, articles, types and maesures are selected, then sorted by date and then the last 10
    dates are selected. As those datasets are spread over the whole table it needs a higher number
    of physical reads. Is there a way to have an index on m_date and an other form of this query
    that selects the requested values with less phyical reads? (Database version is 10.2)
    SQL> select
    2 id,
    3 m_date,
    4 value
    5 from (
    6 select
    7 id,
    8 m_date,
    9 value,
    10 rank() over (order by m_date desc) r
    11 from results
    12 where m_loc = '14001'
    13 and m_article = '11211-00-00'
    14 and m_type = '0002'
    15 and m_measure = '032')
    16 where r <= 10
    17 order by m_date asc;
    ID M_DATE Value
    3931958 05.03.10 69.00
    3931960 05.03.10 69.00
    3905712 10.03.10 68.60
    3999535 10.03.10 69.70
    3985125 11.03.10 69.40
    3957851 11.03.10 69.60
    3949799 21.03.10 68.70
    4017369 21.03.10 69.00
    3951981 22.03.10 68.80
    3983554 22.03.10 68.80
    Abgelaufen: 00:00:03.00
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 48 | 6 (34)| 00:00:01 |
    | 1 | SORT ORDER BY | | 1 | 48 | 6 (34)| 00:00:01 |
    |* 2 | VIEW | | 1 | 48 | 5 (20)| 00:00:01 |
    |* 3 | WINDOW SORT PUSHED RANK | | 1 | 39 | 5 (20)| 00:00:01 |
    | 4 | TABLE ACCESS BY INDEX ROWID| RESULTS | 1 | 39 | 4 (0)| 00:00:01 |
    |* 5 | INDEX RANGE SCAN | I_RES_2 | 1 | | 3 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("R"<=10)
    3 - filter(RANK() OVER ( ORDER BY INTERNAL_FUNCTION("M_DATE") DESC )<=10)
    5 - access("M_LOC"=14001 AND "M_ARTICLE"='11211-00-00' AND "M_TYPE"='0002' AND
    "M_MEASURE"='032')
    Statistiken
    1 recursive calls
    0 db block gets
    547 consistent gets
    474 physical reads
    0 redo size
    766 bytes sent via SQL*Net to client
    380 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    2 sorts (memory)
    0 sorts (disk)
    10 rows processed

    I found a solution, which is much better in terms of physical reads and consistent gets even if the optimizer calculates higher costs. But I still think, that there should be an easier way to do this:
    SQL> select
    2 id, m_date, value from results
    3 where
    4 (m_loc, m_article, m_type, m_measure, m_date)
    5 in
    6 (select m_loc, m_article, m_type, m_measure, m_date
    7 from (
    8 select /*+ first_rows(10) */ m_loc, m_article, m_type, m_measure, m_date
    9 from results
    10 where m_loc = '14001'
    11 and m_article = '11370-00-00'
    12 and m_type = '0002'
    13 and m_measure = '032'
    14 order by m_loc,m_article,m_type,m_measure,m_date desc
    15 ) where rownum < 10);
    ID M_DATE VALUE
    2495995 01.02.09 70,4
    2457657 19.01.09 66,9
    2556262 13.02.09 67,4
    2496232 01.02.09 67,6
    2465051 20.01.09 67
    2454994 19.01.09 67,4
    2545951 13.02.09 67,4
    2502216 01.02.09 67,5
    2497533 01.02.09 67,2
    9 Zeilen ausgewählt.
    Ausführungsplan
    Plan hash value: 3924867000
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 122 | 8 (25)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| RESULTS | 1 | 39 | 3 (0)| 00:00:01 |
    | 2 | NESTED LOOPS | | 1 | 122 | 8 (25)| 00:00:01 |
    | 3 | VIEW | VW_NSO_1 | 1 | 83 | 4 (25)| 00:00:01 |
    | 4 | HASH UNIQUE | | 1 | 31 | | |
    |* 5 | COUNT STOPKEY | | | | | |
    | 6 | VIEW | | 1 | 31 | 4 (25)| 00:00:01 |
    |* 7 | SORT ORDER BY STOPKEY| | 1 | 31 | 4 (25)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | I_RES_2 | 1 | 31 | 3 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | I_RES_2 | 1 | | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    5 - filter(ROWNUM<10)
    7 - filter(ROWNUM<10)
    8 - access("M_LOC"=14001 AND "M_ARTICLE"='11370-00-00' AND "M_TYPE"='0002'
    AND "M_MEASURE"='032')
    9 - access("M_LOC"="$nso_col_1" AND "M_ARTICLE"="$nso_col_2" AND
    "M_TYPE"="$nso_col_3" AND "M_MEASURE"="$nso_col_4" AND "M_DATE"="$nso_col_5")
    Statistiken
    1 recursive calls
    0 db block gets
    36 consistent gets
    14 physical reads
    0 redo size
    748 bytes sent via SQL*Net to client
    381 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    9 rows processed

  • The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    Hey there Luba_kalstad,
    It sounds like you are unable to join your network and cannot see it in the Wi-Fi list in Settings. I would try the troubleshooting outlined in this article named:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Be sure you're in range of your Wi-Fi router (access point).
    Tap Settings > Wi-Fi and turn Wi-Fi off and on. If your Wi-Fi setting is dimmed, follow these steps.
    Confirm that your Wi-Fi router and cable or DSL modem are connected to power, turned on, and connected to the Internet. If not, refer to your network administrator or Internet service provider (ISP) for assistance.
    Restart your iOS device.
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    Tap and Forget this Network.
    Try to connect to your desired Wi-Fi network.
    Note: You may need to enter your Wi-Fi password again if your network requires one.
    Turn your Wi-Fi router off and on2. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    Update your device to the latest version of software.
    Update your Wi-Fi router to the latest firmware2. For AirPort Base Stations, install updates using the AirPort Utility.
    And this section down toward the bottom if needed:
    Unable to locate a Wi-Fi network
    Verify that the network is available by tapping Settings > Wi-Fi and choosing from the available networks.Note: It may take a few seconds for the Wi-Fi network name to appear.
    Move closer to your wireless router (access point) and attempt to locate the Wi-Fi network.
    If you do not see the network you would like to join, you may be attempting to connect to a hidden network. Learn how to join a hidden network.
    Supported Wi-Fi configurations vary by iOS device model. Find out which standards your device supports3.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including:
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • I am not able to access the "featured" and "top charts" in the app store

    I am not able to access the "featured" and "top charts" icons in the app store.  Everything else works fine.

    Here I am using Java Type IV for database
    connection.
    So,there was no necessity of creating DNS.How your app communicates with db shouldn't matter for the end user. Still, you may want to use a functional network name also for the thin client driver connection string.
    So,is there any other way to solve this problem.What is the problem really? Do you not use dns for network naming? Maybe you have to manage the hosts file on every client then.

  • Flat file should have source field name and value

    Hi Friends
    I have a scenario of Idoc to Flat file , where in the target structure the field name and value should be present, generally only the value is available in a flat file.The target structure is as below:
    for e.g RECTYPE is the Field Name and A is the value.
    RECTYPE,A
    DATEH,20111101
    TIMEH,173125
    RECTYPE,B
    ORDNUM,4500054536
    ORDITM,150
    SUPDAT,20090218
    PLNQTY,000000006
    MATNR,14B300
    BATCH,5697
    PLANT,3026
    DELIVTYPE,PO
    SUPPLIER,0000023305
    SUPNAME,Deutsche BP AG
    SUPADRS,Erkelenzer Strasse 20
    SUPCITY,Monchengladbach
    SUPPOST,41179
    SUPCOUN,DE
    TRUCK_NBR,7589
    BOND_FLG,X
    STG_LOC,PLCL
    LINE_ACTION,CRE
    RECTYPE,B
    ORDNUM,4500056721
    ORDITM,10
    SUPDAT,20090218
    PLNQTY,000000013
    MATNR,116703
    BATCH,6589
    PLANT,3026
    DELIVTYPE,PO
    SUPPLIER,0000023380
    SUPNAME,DOW Belgium NV
    SUPADRS,Havenlaan 7
    SUPCITY,Tessenderlo
    SUPPOST,3980
    SUPCOUN,BE
    TRUCK_NBR,7589
    BOND_FLG,X
    STG_LOC,PLCL
    LINE_ACTION,CHG
    RECTYPE,X
    DATEH,20111101
    TIMEH,173125
    RECORDS,3

    Hi,
         NameA.addHeaderLine
    Specify whether the text file will have a header line with column names. The following values are permitted:
    ■       0 u2013 No header line
    ■       1 u2013 Header line with column names from the XML document
    ■       2 u2013 As for 1, followed by a blank line
    ■       3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied
    ■       4 u2013 As for 3, followed by a blank line
    This specification is only permitted if exactly one structure is defined.
    regards,
    ganesh.

Maybe you are looking for