0

YQL query

hi guys,
i have a question.
i have a table that works correctly on my YQL query.
now i want improve my queries, making a filter in the 'where' part of the query and selecting the attribute of the xml tag.

for example with this xml:
<result>
<hello att=1/>
<hello att=2/>
</result>

i want make this query: select * from table where hello.att="1" (or something similar).

is this possible? thanks!!!

by
2 Replies
  • Of course! Attribute there would be one of the attributes on the XML, so your XML suppose to be something like this:

    <foo>
    <att1>1</att1>
    <att2>2</att2>
    </foo>
    <foo>
    <att1>2</att1>
    <att2>3</att2>
    </foo>

    if you do something like select * from foo where att1 = 1, then the first one will be returned..
    0
  • QUOTE (Grady @ May 28 2010, 02:49 PM) <{POST_SNAPBACK}>
    Of course! Attribute there would be one of the attributes on the XML, so your XML suppose to be something like this:

    <foo>
    <att1>1</att1>
    <att2>2</att2>
    </foo>
    <foo>
    <att1>2</att1>
    <att2>3</att2>
    </foo>

    if you do something like select * from foo where att1 = 1, then the first one will be returned..



    ok thank a lot!
    0

Recent Posts

in YQL