blob: 832efbcfe44904e7ba130f5fc39311282212d788 [file] [log] [blame]
/*
* Testcase Name : endwith03.aql
* Description : Positive tests
* Success : Yes
* Date : 20th April 2012
*/
// create internal dataset, insert string data into string field and pass the string filed as input to end-with function
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TestType as {
name:string
}
create dataset testds(TestType) partitioned by key name;
insert into dataset testds({"name":"Jim Jones"});
insert into dataset testds({"name":"Ravi Kumar"});
insert into dataset testds({"name":"Bruce Li"});
insert into dataset testds({"name":"Marian Jones"});
insert into dataset testds({"name":"Phil Jones"});
insert into dataset testds({"name":"I am Jones"});
write output to nc1:"rttest/string_endwith03.adm";
for $l in dataset('testds')
order by $l.name
where end-with($l.name,"Jones")
return $l