blob: 832efbcfe44904e7ba130f5fc39311282212d788 [file] [log] [blame]
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +00001/*
2 * Testcase Name : endwith03.aql
3 * Description : Positive tests
4 * Success : Yes
5 * Date : 20th April 2012
6 */
7
8// create internal dataset, insert string data into string field and pass the string filed as input to end-with function
9
10drop dataverse test if exists;
11create dataverse test;
12use dataverse test;
13
14create type TestType as {
15name:string
16}
17
18create dataset testds(TestType) partitioned by key name;
19
20insert into dataset testds({"name":"Jim Jones"});
21insert into dataset testds({"name":"Ravi Kumar"});
22insert into dataset testds({"name":"Bruce Li"});
23insert into dataset testds({"name":"Marian Jones"});
24insert into dataset testds({"name":"Phil Jones"});
25insert into dataset testds({"name":"I am Jones"});
26
27write output to nc1:"rttest/string_endwith03.adm";
28
29for $l in dataset('testds')
30order by $l.name
31where end-with($l.name,"Jones")
32return $l
33