0

update with sub-select

I would like to update photo tags in flickr with this query:

update photos set tags="cats" where photo_id IN (select id from photos where title like "Kitten%")

But when I look the diagnostics at the YQL console, the message send to the server looks something like:

http://api.flickr.com/services/rest/? ... &method=flickr.photos.setTags&photo_id=123&tags=null ...

The update definition in the open table is:
<update> ... <input>.... <value id="tags" type="xs:string" paramType="variable" required="true" /> ...

And the JavaScript that it executes is:

var fs = new flickrSigner(api_key,secret);
response.object = y.rest(fs.createUrl({method:"flickr.photos.setTags", photo_id:photo_id, auth_token:auth_token, tags:tags})).get().response;


Am I doing something wrong?
The documentation says you cannot use sub-selects with INSERT. Does this also apply to UPDATE?

by
1 Reply
  • Can you show me your entire Open Data Table. Also are you getting the value of 'tags' in your execute? Maybe a y.log('tags:' + tags); would help

    -- Nagesh

    QUOTE (Mayleen @ Oct 30 2009, 05:30 AM) <{POST_SNAPBACK}>
    I would like to update photo tags in flickr with this query:

    update photos set tags="cats" where photo_id IN (select id from photos where title like "Kitten%")

    But when I look the diagnostics at the YQL console, the message send to the server looks something like:

    http://api.flickr.com/services/rest/? ... &method=flickr.photos.setTags&photo_id=123&tags=null ...

    The update definition in the open table is:
    <update> ... <input>.... <value id="tags" type="xs:string" paramType="variable" required="true" /> ...

    And the JavaScript that it executes is:

    var fs = new flickrSigner(api_key,secret);
    response.object = y.rest(fs.createUrl({method:"flickr.photos.setTags", photo_id:photo_id, auth_token:auth_token, tags:tags})).get().response;


    Am I doing something wrong?
    The documentation says you cannot use sub-selects with INSERT. Does this also apply to UPDATE?
    0

Recent Posts

in YQL