| * Testcase Name : substr05.aql |
| * Description : Test substring2(string,position,position) built in function. |
| // To test substring2 function with string data stored in an internal dataset. |
| drop dataverse test if exists; |
| create type TestType as open { |
| create dataset testdst(TestType) partitioned by key name; |
| insert into dataset testdst({"name":"UC Berkeley"}); |
| insert into dataset testdst({"name":"UC Irvine"}); |
| insert into dataset testdst({"name":"UC LA"}); |
| insert into dataset testdst({"name":"UC Riverside"}); |
| insert into dataset testdst({"name":"UC San Diego"}); |
| insert into dataset testdst({"name":"UC Santa Barbara"}); |
| insert into dataset testdst({"name":"UT Austin "}); |
| insert into dataset testdst({"name":"UT Dallas"}); |
| write output to nc1:"rttest/string_substr05.adm"; |
| for $a in dataset('testdst') |
| return substring2($a.name,4,string-length($a.name)); |