IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  how can I converse SQL clause to XQuery clause??

    Posted Wed April 28, 2004 04:47 AM

    the follow sql clause:
    select A.unitid ,A.unitname from A where
    unitid in (select unit from B)

    besides:
    A------>f:\xquery\unit.xml
    B------>f:\xquery\taskplan.xml

    I had conversed this sql to xqurey ,but return no values.who can help me?

    my Xquery clause as following :
    for $v1 in document (“F:\xquery\unit.xml”)//LSQLResults/Row
    where some $v3 in $v1/unitid satisfies ( some $v4 in ( for $v2 in document(“F:\xquery\taskplan.xml”)//LSQLResults/Row return {$v2/unit} )//Row satisfies $v4=$v3)
    return {$v1/unitid} {$v1/unitname}


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: how can I converse SQL clause to XQuery clause??

    Posted Thu May 06, 2004 05:02 PM

    Hi,

    I do not fully understand what you intend, but I guess that the subexpression :
    ( for $v2 in document(“F:\xquery\taskplan.xml”)//LSQLResults/Row
    return {$v2/unit} )
    //Row
    is empty.
    The for clause retrieves Row element nodes. From each one of these you take the
    set of unit element children and wrap these into a new Row element. From the set
    of all these Row elements you select all Row descendants. Unless there are again
    Row elements below unit this is an empty sequence.
    Try to replace this subexpression with something better. I can advise you here
    when you tell me what you intend.
    Are you aware that case matters in XQuery, i.e. Row != row and unit != Unit ?

    Regards,
    Juliane.


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: how can I converse SQL clause to XQuery clause??

    Posted Sun May 09, 2004 11:35 AM

    thank you Juliane
    my English capbility is poor,so you could not understand what I means.
    sorry.

    my problem had solved,by following expression:
    for $v1 in document (“F:\xquery\unit.xml”)//LSQLResults/Row
    where $v1/unitid =(for $v2 in document(“F:\xquery\taskplan.xml”)//LSQLResults/Row return {$v2/unit} )//unit
    return {$v1/unitid} {$v1/unitname}

    thx agin for your answer.
    can we make friends,and help me learn English?


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: how can I converse SQL clause to XQuery clause??

    Posted Fri May 14, 2004 05:32 AM

    hi
    how can I transfer this sql to XQuery clause?
    select A.unitid ,A.unitname from A,B where A.unitid=B.unit group by A.unitid,A.unitname


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: how can I converse SQL clause to XQuery clause??

    Posted Mon May 17, 2004 12:36 PM

    Hi,

    XQuery allows grouping by suitably combining other syntactic means
    as described in an appendix to the recent XQuery draft, see

    http://www.w3.org/TR/xquery/#id-grouping.

    Be aware that the grammar has changed since QuiP was built and thus
    some bits might look different, e.g. the order clause.

    Regards,
    Juliane.

    PS: Your English will improve by taking part in forum discussions.


    #webMethods
    #Tamino
    #API-Management


  • 6.  RE: how can I converse SQL clause to XQuery clause??

    Posted Tue May 18, 2004 05:48 AM

    hi Juliane
    thanks
    I have saw the recent XQuery draft,
    the change is obvious,and the function is stronger than ever.
    now i am using Quip to develop a software

    i need the recent Quip to support the recent XQuery draft,please give me the url
    thanks,could you understand what i mean?


    #API-Management
    #webMethods
    #Tamino


  • 7.  RE: how can I converse SQL clause to XQuery clause??

    Posted Tue May 25, 2004 03:55 PM

    Hi,

    yes I understood. There is no recent QuiP. For an up-to-date, free
    XQuery implementation try saxon at http://saxon.sourceforge.net/.
    For an overview visit the W3C’s XML Query site and go to
    ‘products’.

    Regards,
    Juliane.


    #API-Management
    #Tamino
    #webMethods


  • 8.  RE: how can I converse SQL clause to XQuery clause??

    Posted Tue May 25, 2004 03:56 PM

    Forgot to mention that the W3C’s XML Query site is at
    http://www.w3.org/XML/Query


    #API-Management
    #Tamino
    #webMethods