Query column value as attribute for an element

I want to select out a column to be an attribute for an element in my XML file. I know that if I use "@column_name" I will get an attribute but it will be for the row's element. In this case I don't want. In my example below I want a column called DATE_TYPE to be the attribute for the column DATE that is an element. How would I do this? If I select out @DATE_TYPE I get it as an attribute of the <element1> node.
<element1>
<element2>VALUE</element2>
<date>2003-09-02</date>
</element1>

As Darrin said, it just matters which element is considered the "active" element.  So in your second example, you actually wrote to it a 3 and then a 1 (classic race condition).  You can set the active element with a property of the array (having trouble finding it at the moment).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Is there a bug with firefox when supporting "aria-labelledby" attribute for span element?

    I use firefox 10.0.3, and using JAWS 13 to read the screen.
    I set the "aria-labelledby" attribute for the span, and only first element content was read even I set three 'id' for this attribute. This can work well under IE8.
    <pre>&lt;table role="grid" summary="Details table"&gt;
    &lt;tr&gt;
    &lt;td type="columnTitle"&gt;&lt;span tabIndex="0" role="gridcell"&gt;Date&lt;/span&gt;&lt;/td&gt;
    &lt;th id="_NS_hdr1" role="columnheader" type="columnTitle"&gt;&lt;span tabIndex="-1" role="columnheader"&gt;3/4&lt;/span&gt;&lt;/th&gt;
    &lt;th id="_NS_hdr2" role="columnheader" type="columnTitle"&gt;&lt;span tabIndex="-1" role="columnheader"&gt;3/11&lt;/span&gt;&lt;/th&gt;
    &lt;th id="_NS_hdr3" role="columnheader" type="columnTitle"&gt;&lt;span tabIndex="-1" role="columnheader"&gt;3/18&lt;/span&gt;&lt;/th&gt;
    &lt;th id="_NS_hdr4" role="columnheader" type="columnTitle"&gt;&lt;span tabIndex="-1" role="columnheader"&gt;3/25&lt;/span&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;th id="_NS_hdr5" role="rowheader" type="columnTitle"&gt;&lt;span tabIndex="-1" role="rowheader"&gt;Count&lt;/span&gt;&lt;/th&gt;
    &lt;td headers="_NS_hdr1 _NS_hdr5" type="datavalue"&gt;
    &lt;span tabIndex="-1" id="_NS_N158B5CC0.1614A0C80" role="gridcell" aria-labelledby="_NS_hdr1 _NS_hdr5 _NS_N158B5CC0.1614A0C80"&gt;0&lt;/span&gt;
    &lt;/td&gt;
    &lt;td headers="_NS_hdr2 _NS_hdr5" type="datavalue"&gt;
    &lt;span tabIndex="-1" id="_NS_N158B5CC0.1614A1200" role="gridcell" aria-labelledby="_NS_hdr2 _NS_hdr5 _NS_N158B5CC0.1614A1200"&gt;75&lt;/span&gt;&lt;/td&gt;
    &lt;td headers="_NS_hdr3 _NS_hdr5" type="datavalue"&gt;
    &lt;span tabIndex="-1" id="_NS_N158B5CC0.1614A1780" role="gridcell" aria-labelledby="_NS_hdr3 _NS_hdr5 _NS_N158B5CC0.1614A1780"&gt;231&lt;/span&gt;
    &lt;/td&gt;
    &lt;td headers="_NS_hdr4 _NS_hdr5" type="datavalue"&gt;
    &lt;span tabIndex="-1" id="_NS_N158B5CC0.1614A1D00" role="gridcell" aria-labelledby="_NS_hdr4 _NS_hdr5 _NS_N158B5CC0.1614A1D00"&gt;81&lt;/span&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;</pre>

    Hi MacroZ,
    I understand your point. JAWS support different ways to navigate the page, such as use 'tab' key to navigate clickable items, or use 'Ctrl+Alt+arrow keys' to navigate the data table cells.
    I removed the 'gridcell' role from data cells and when I use 'Ctrl+Alt+arrow keys', it works well(I move to one cell, and it can read column title, then row title, then cell value). So it's acceptable because at least we have one way to read this data table :)
    There is one more thing I want to ask, I have one page that include one iframe, and the page inside the iframe has several hyper links, I start JAWS13, then use 'tab' key to navigate these links inside the iframe page, when I navigate to one link, I press 'enter' key to goto the new page, then I found all links in the new page do not work when I navigate to any of them and press 'enter' key(it can works well when using mouse click). Seems there's no problem under IE8, I'm not sure this issue comes from JAWS or firefox, so hope you can help to confirm on this, many thanks!

  • Bindable attribute for BSP elements in BSP extensions

    Hey all
      Can anyone explain what the 'Bindable' attribute in BSP elements, in BSP extensions, is for? It has no F1 help documentation and is not documented in the SAP library with the rest of the BSP element attributes.
    Many thanks
    Mark

    Which field is? Has translate value content to spanish for this field?.
    In SAP CRM UI, press F2 and tell me which is the field

  • How to tell if column value has changed for use in workflow actions

    Hello,
    I am using Sharepoint 2010 and for one of my Lists, I am using a general list workflow.  What I need to be able to do is determine if a column value has change (say an "Assigned To" field) because I only want to take some action if that particular
    value has changed.  I want to be able to have a workflow action that would be something like:
    If Current Item: Assigned To not equals [OLD VALUE]
    I have found some web searches that talk about creating a duplicate list or duplicate (but hidden) column but that doesn't seem to be the way to go.  I have document versioning set but don't if that can be used to help with this.  One possible
    thought (although I haven't tried it to see if it works) is to create local variables and have the values in the variables be the "old value".  Just not sure if there is a best practices for doing this.
    Thanks for any thoughts - Peter

    Helen,
    Not sure I fully understand your goal.  We don't use "tasks" at all but if you are looking to have your workflow check certain valus and be able to send email messages to people based on whatever, then you can certainly do that (as long as your Sharepoint
    has the email setup.  We do this for alot of workflow tasks.
    So, in the workflow you can have a blanket statement like what I previously listed:
    if Current Item:hiddenStatus  not equals Current Item:Status
        .... do something
    or you can do something like:
    if Current Item:hiddenStatus equals "In-Progress"
        .... do something
    Else if Current Item:hiddenStatus  equals "Completed"
        .... do something
    or combine the two and do nested "if" statements.  Then you add an email statement wherever you need it like:
    if Current Item:hiddenStatus  equals "Completed"
       then email "these users"
    To add the email part, just type in "email" on the line where you want to add a statment.  There is only one option to choose from.  That will display the line "then email these users".   The "these users" will be a link.  When you
    click it you will get a popup to add the email info.  We typically will send the email to a user (or users) that are already listed in one of the PeoplePicker fields.  On the email form, you can type in your own text, designate that a value is based
    on a column value (like our PeoplePicker), designate that a value is based on a workflow variable, add a link to the current item, etc.  To get to these options you will click the button to the right of the fields or use the "Add or Change Lookup" button
    in the bottom-left for the text area.  There is alot you can set in the mail.
    Does this help answer your question?
    - Peter

  • How to Rename the "All Column Values" in Propmt for 11 G.

    Hello,
    i have one Requirement where i have to change the "All Column values" label to custom label.
    I know how to do in 10 g but as here in 11g the oracle directory structure is changed.
    if anyone have idea how to do this?
    Thanking you..

    Hi Veer,
    I think "kmsgPromptRunTimeDropdownAllChoices" is the identifier which will pick up this value from a messages file. Request you to search for this string in Oracle_BI1\bifoundation\web folder's files if you can get one.
    Hope this helps.
    Thank you,
    Dhar

  • Querying XML Column in SQL to get all attributes for a element

    I have data in a XML column that is formatted as such:
    <TestTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <MTouch TabKey="20" Priority="0">
    <MMouse MouseKey="21" Priority="0" /> </MTouch>
    <MTouch TabKey="11" Priority="1" />
    <MTouch TabKey="14" Priority="2" />
    <MTouch TabKey="17" Priority="3" />
    <MTouch TabKey="23" Priority="4">
    <MCategories CatKey="8" Priority="0" />
    <MMouse MouseKey="27" Priority="1" />
    <MMouse MouseKey="30" Priority="2" />
    <MMouse MouseKey="26" Priority="3" />
    <MCategories CatKey="9" Priority="4" />
    <MGroups GroupKey="3" Priority="5" />
    <MMouse MouseKey="28" Priority="6" />
    <MCategories CatKey="7" Priority="7" />
    <MMouse MouseKey="29" Priority="8" />
    </MTouch>
    <MTouch TabKey="6" Priority="5">
    </MTouch>
    </TestTemplate>
    In my query I am getting the following results :
    ElementName
    AttributeName
    TabKey
    CategoryKey
    MTouch
    MCategories
    6
    7
    MTouch
    MCategories
    6
    8
    MTouch
    MCategories
    6
    9
    MTouch
    MCategories
    11
    7
    MTouch
    MCategories
    11
    8
    MTouch
    MCategories
    11
    9
    MTouch
    MCategories
    14
    7
    MTouch
    MCategories
    14
    8
    MTouch
    MCategories
    14
    9
    MTouch
    MCategories
    17
    7
    MTouch
    MCategories
    17
    8
    MTouch
    MCategories
    17
    9
    MTouch
    MCategories
    20
    7
    MTouch
    MCategories
    20
    8
    MTouch
    MCategories
    20
    9
    MTouch
    MCategories
    23
    7
    MTouch
    MCategories
    23
    8
    MTouch
    MCategories
    23
    9
    This is my query:
    SELECT DISTINCT
    'MTouch' AS ElementName,
    'MCategories' AS AttributeName,
    n.y.value('@TabKey', 'int') AS TabKey,
    e.y.value('@CatKey', 'int') AS CategoryKey
    FROM TXML cross apply tablename.columnname.nodes('//TestTemplate//MTouch//MCategories') AS e(y)
    cross apply tablename.collumnname.nodes('//TestTemplate//MTouch') AS n(y)
    I would like my results to show only the catkey attribute value to show only for MTouch TabKey 23. I need help on how to write the query. Below is the result I am looking for. Notice the Categorykey column is null for all except where
    the Element Name of MTouch has a TabKey value of 23.
    ElementName
    AttributeName
    TabKey
    TouchPriority
    CategoryKey
    MTouch
    MCategories
    6
    5
    MTouch
    MCategories
    11
    1
    MTouch
    MCategories
    14
    2
    MTouch
    MCategories
    17
    3
    MTouch
    MCategories
    20
    0
    MTouch
    MCategories
    23
    4
    7
    MTouch
    MCategories
    23
    4
    8
    MTouch
    MCategories
    23
    4
    9
    Thanks in advance
     

    As per the this explanation
    I would like my results to show only the catkey attribute value to show only for MTouch TabKey 23
    it should be this
    select
    t.u.value('@TabKey[1]','int') AS tabKey,
    t.u.value('@Priority[1]','int') AS Priority,
    m.n.value('@CatKey[1]','int')
    from @x.nodes('/TestTemplate/MTouch')t(u)
    outer apply u.nodes('.[@TabKey="23"]/MCategories')m(n)
    ORDER BY 1,3
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Column value substitution in tabular form element attributes

    We started to discuss this at Re: Tabular form with Ajax
    I also mentioned this at Re: how to make only some rows editable in html db.
    but thought that this deserves its own thread.
    In Doug's sample Sudoku application in that thread, he uses #COLUMN# substitution in the Form Element Attributes and it works fine, but in my example page at http://htmldb.oracle.com/pls/otn/f?p=24317:219 I used the same technique and no matter what I do, the #COLUMN# substitution is not expanded by the Apex engine.
    This is driving me nuts, any ideas why it works in one application but not in another?
    Thanks

    Hm, you might be right.
    I copied your row template and modified it at http://htmldb.oracle.com/pls/otn/f?p=24317:219
    The styling looks terrible, not sure why, the template is simply
    <tr>
    <td class="t10data">#EMPNO_DISPLAY#</td>
    <td class="t10data">#ENAME#</td>
    <td class="t10data">#JOB#</td>
    <td class="t10data">#MGR#</td>
    <td class="t10data">#HIREDATE#</td>
    <td class="t10data">#SAL#</td>
    <td class="t10data">#COMM#</td>
    <td class="t10data">#DEPTNO#</td>
    </tr>I had a lot of trouble getting this to work because the wizard generated tabular form appends 2 hidden fields containing the PK and the row-checksum to the last (editable?) field on each row. If the last editable field has #COL# substitution, it expands the substitution and forgets to close the INPUT tag thus causing malformed HTML (I think this is a bug in the rendering engine).
    The readonly condition is sal>1000 which now works. The SAL>1000 fields are now readonly.
    But now the update process is broken. If I enter a number in the first blank SAL field (empno=3641) and click Submit, I get no errors but the change is not saved. Wonder why.
    Hopefully, Scott (Spadafore) will take mercy on our amateurish experiments and give us some definitive answers soon!
    Thanks.

  • Multiple Attributes for an Element

    Hi,
    I am trying to create an XML Document with an Element having multiple
    attributes -
    <field name="dept">1</field>
    <field name="firstname">Barbara</field>
    <field name="lastname">Streisand</field>
    <field name="age">59</field>
    In my code I am trying something like this :-
    Element field2 = document.createElement("field");
    field2.setAttribute("name", "firstname");               
    rootElt.appendChild (field2);
    rootElt.appendChild(document.createTextNode (firstname));
    Any Advice !!
    -Thanks

    You didn't seem to have a problem, but you asked for advice. So here's my advice: Use meaningful element names.
    <Department>1</Department>
    <Firstname>Barbara</Firstname>
    <Lastname>Streisand</Lastname>
    <Age>59</Age>

  • Multiple values of attributes for Transaction type Bid in the Org Plan

    Hello All,
    I need to have Multiple transaction types for the Object Bid Invitation in the Org Plan.
    As the system is allowing only a single value,I tried maintaining the Table T77OMATTR by setting the attribute 'Tend_type' to take multiple values, but the whole attribute is set to not modifiable!
    I am not sure whether I am doing the right thing
    Can anybody advise on this please?
    Regards,
    Nagarajan

    Hi
    different transactions types, which can be selected in the transaction, are defined in SPRO via
    IMG/Supplier Relationship Management/SRM Server/Cross-Application Settings/Define Transaction Types. There you can create new ones as well activate/deactivate transaction types.
    The follow on document, PO or Contract, is defined per transaction type there as well.
    When you want to influence the transaction type used from Sourcing Cockpit when clicking on "Bid Invitation", this can be accomplished via BADI only in SRM 5.0. Check the BADI section - don't know it by heart.
    Cheers,
    Claudia

  • Data types related to incrementing a query column value

    ColdFusion: 9.0.1
    Server OS: Windows 7
    Web Server: Apache 2.2.21
    Database: SQL Server Express
    I have been returning numeric values from the database for a while.  Some I have left as straight values and some I have used in other calculations.  Not sure if this is related, but after upgrading to ColdFusion 9.0.1 I experienced an unexpected data conversion (at least that seems to be what is happening).  I am returning a value from a database (column datatype is integer) and incrementing it by 1.
    Code:
    <cfquery name="qry" datasource="DATASOURCE">
         SELECT MAX(Number)
         FROM MyTable
    </cfquery>
    <cfset myNumber = qry.Number + 1 />
    I am expecting this to return a whole number (integer).  However, it seems that I am getting a double now.  This I discovered by dumping out the suspect variable's class:
    Code:
    <cfdump var="#myNumber.getClass()#" />
    I was able to fix the issue by converting the variable to an integer using javaCast(), but I am wondering if this is a change/issue with ColdFusion 9.0.1 or something else, because this has worked just fine before.

    I doubt the behavior is new. CF usually converts to "double" implicitly whenever you apply mathematical operations (+,-, *, ...). So I am not sure what effect that has on your code. Can you elaborate?
       SELECT MAX(Number)
    As an aside, I am not sure what the code is doing exactly but SELECT MAX(...) is not inherently thread safe. Is there a reason you need to do this manually as opposed to using an auto-incrementing identity column?
    -Leigh

  • How can I get the Attribute Value in the existing XML Elements-Reg.

    Dear All,<br /><br />  I have the InDesign Document with xml Based, now I want to get the XML Elements name and XML Attributes for each Elements, using SDK Concepts. <br /><br />Example:<br /><br /> <chapter>  chapter1 </chapter> id = "ch001"<br /> <sec> Section ....</sec> id ="se001"<br /> <para> para ....</para> id="pa001"<br /><br />How can I get the XMLElements & XML Attributes in the InDesign-XML Structure.<br /><br />Please  any one can suggest me....<br /><br />Thanks & Regards<br />T.R.Harihara SudhaN

    Dear Dirk
    Many Thanks for the Suggestions, Now I search and study the XML concepts. Meanwhile, I need your suggestions for further Development in SDK -XML concepts.
    I am using the SnippetRunner -SDK file, their given some XML based programmes. [Create XML Elements, Elements + Attributes, XML Comments] and etc...
    Hope U will help me to Develop the SDK- XML Concepts.
    Thanks & Regards
    T.R.Harihara SuduhaN

  • Column values with invalid characters

    How to find the column values with invalid chararcters
    meaning value upper(col) not in ('ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
    For ex.
    1. CDAssyKit,DragonNaturallySpeaking�Preferred7.0,USEnglish
    2. CDAssyKit,DragonNaturallySpeaking Preferred7.0,USEnglish
    Query should retrieve only the first row, since it has extra � character in the column value.
    Thanks for your help.

    Convert all letters and numbers to an arbitrary letter and then remove that letter. If there are any characters left, they are invalid according to your rules.
    select *
      from t
    where replace(translate(lower(column_name), 'abcdefghijklmnopqrstuvwxyz0123456789', 'a'), 'a') is not null;

  • Display Column Value Once

    Hey,
    I am trying to only display a column value one time for a record, not a static value. The value changes and there can be many values. I do not think grouping will work since the Date value is dynamic. I am using Oracle for Toad 10.5. There are 4 records with this test data.
    select Date, Person, Language, Country
    from TableA
    TableA
    Date            Person  Language   Country
    01/25/2013       James   English
    12/20/2012       James   English
                                         US
                                         AFWould like to only display
    Date            Person  Language   Country
    01/25/2013       James   English
    12/20/2012 
                                         US
                                         AFThanks for reading this thread!
    Edited by: Nikki on Jan 7, 2013 1:08 PM

    Hi,
    You can use the analytic ROW_NUMBER function to see if a given row is the 1st row in a group, and only display the person and language columns when it is:
    WITH     got_r_num     AS
         SELECT       dt          -- DATE is not a good column name
         ,       person, language, country
         ,       ROW_NUMBER () OVER ( PARTITION BY  person
                                      ,          language
                               ORDER BY          dt
                             )  AS r_num
         FROM      table_x
    SELECT       dt
    ,       CASE WHEN r_num = 1 THEN person   END)     AS person
    ,       CASE WHEN r_num = 1 THEN language END)     AS language
    ,       country
    FROM       got_r_num
    ORDER BY  person, language, dt     -- If wanted
    ;Your front end may also have a way to hide those values when you want. The BREAK feature in SQL*Plus does this; I don't know if Toad has anything comparable.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) where the query above produces the wrong results, and also post the right results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Weird ORA-01406: fetched column value was truncated error for SELECT query

    DB version:10gR2
    When one of our application fires the below query, we get
    ORA-01406: fetched column value was truncatederror.
    select     trk_dtl,
         trk_type,
         trk_id,
         trk_desc,
    from     shp_dtl
    where     shp_type = 'HN'
    and     shp_type = 828;The documentation says
    Cause:In a host language program, a FETCH operation was forced to truncate a character string. The program buffer area for this column was not large enough to contain the entire string. The cursor return code from the fetch was +3.But when the application is pointed to an identical schema in the same instance, we don't get this error. So, this has got nothing to do client application as the documentation says.
    Any idea what other possibilities are there?

    Post description of shp_dtl.

  • Querying the schema for table name with column value!

    In my schema i have 500+ tables and other objects.
    i have a column with the name BO_PRODUCT_CODE.
    I wants to know in what tables the value of BO_PRODUCT_CODE='FX03'.
    i have query the user_tab_columns which gives me the result with 90 tables having the column BO_PRODUCT_CODE.
    What is query which will give me the exact number/name of the table whose column value is FX03. ie, BO_PRODUCT_CODE='FX03'.

    Hi you can use this approach:
    BEGIN
    v_str VARCHAR2(250);
    v_count NUMBER :=0;
    DECLARE
    FOR loop_tbl IN ( SELECT DISTINCT table_name FROM USER_TAB_COLUMNS
    WHERE column_name ='BO_PRODUCT_CODE' )
    LOOP
    v_str := 'SELECT COUNT(*) FROM ' || loop_tbl.table_name || ' WHERE BO_PRODUCT_CODE=||'''' ||'FX03' || '''' '
    EXECUTE IMMEDIATE v_str INTO v_count ;
    IF v_count > 0 THEN
    DBMS_OUTPUT.PUT_LINE ('Table Name :'|| loop_tbl.table_name || ' Count :'||v_count);
    END IF;
    v_count :=0;
    END LOOP;
    EXCEPTION
    WHEN others THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;
    Please remove if any syntax error.
    Regards

Maybe you are looking for

  • Datatype change in RTF template

    Hi Team, I am not sure if this can be done, but, do we have a way in which we can change the datatype of a column in rtf template while preparing the template. Can you please help! Thanks Bhupendra Edited by: Bhupendra Gupta on Sep 9, 2009 4:21 AM

  • The type or namespace name 'Optimization' does not exist in the namespace 'System.Web'

    App_Start\BundleConfig.cs (1): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)  Global.asax.cs (4): The type or namespace name 'Optimization' does not exist in the namesp

  • Changing iCloud account I.D.

    I can't seem to change my iCloud account sign-in I.D. name on my iPad.  On my iPhone 4, iTunes Store, and my MacBook Air the account sign-in I.D. is one account name, but on the iPad it's another older one that I don't want to use. I recall changing

  • Non-printing Snippets

    Help, I am using RoboHelp HTML version 7.02.001 My problem is that my Snippets are visible in the work area and in the chm when compiled, however, when I generate a Word (or PDF) file from the topic they are nowhere to be seen! This is quite a proble

  • Using ipod on xbox 360

    I just today bought an xbox 360 and i tried connecting my ipod video to it but for some reason after i select the song to be played absoloutly nothing happens. Please help me resolve this issue. I appriciate the help thank you.