Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XQuery

KaushikBoseApr 28 2016 — edited Apr 29 2016

XQuery

Input: (1,2,3,4,5,6,7,14,15,16,17,24,25,26,27,28)

Output: (1,7,14,17,24,28)

I tried to remove consecutive numbers from the input sequence using the XQuery functions but failed doing so

xquery version "1.0" encoding "utf-8";

declare namespace ns1="http://www.somenamespace.org/types";

declare variable $request as xs:integer* external;

declare function local:func($reqSequence as xs:integer*) as xs:integer* {

let $nonRepeatSeq := for $count in (1 to count($reqSequence)) return

if ($reqSequence[$count+1] - $reqSequence) then remove($reqSequence,$count+1) else ()

return $nonRepeatSeq

};

local:func((1,2,3,4,5,6,7,14,15,16,17,24,25,26,27,28))

Please suggest how to do so in XQuery functional language.

Comments

Mike Kutz
Answer

sooo.... we meet again.

quick answer:  Create Page -> Data Loading

This actually produces a few pages in your application such that they act like a "wizard" for (as the name suggest) Data Loading.

1st page allows you to either upload a csv file or copy+paste into a text area

2nd page verifies the "column in csv to column in table" mapping.  You can also specify certain "formats" for the data (eg date formats)

3rd page allows the end-user to verify the data.

4th page is the "hey, i did this.  here is what was done."

MK

Marked as Answer by Doolius · Sep 27 2020
Doolius

Haha why yes we do.

Thanks again. Unfortunately 4.0 doesn't have that function.

Guess this would be a good time to suggest an upgrade to our application.

Steven

Mike Kutz

Don't forget, you can make a prototype on http://apex.oracle.com/ to show off the new features.

MK

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 27 2016
Added on Apr 28 2016
1 comment
851 views