blob: bba2a7fe4ab9143319964966749da47da494c844 [file] [log] [blame]
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +00001/*
2 * Description : Test string-length(string) function
3 * Expected Res : Success
4 * Date : 19th April 2012
5 */
6
7
8// Create internal dataset, insert string data and pass the string attribute to string-length function, and verify results.
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":"Maradona"});
21insert into dataset testds({"name":"Pele"});
22insert into dataset testds({"name":"Roberto Baggio"});
23insert into dataset testds({"name":"Beckham David"});
24insert into dataset testds({"name":"Rooney"});
25insert into dataset testds({"name":"Ronaldinho"});
26insert into dataset testds({"name":"Ronaldo"});
27insert into dataset testds({"name":"Zinadine Zidane"});
28insert into dataset testds({"name":"Cristiano Ronaldo"});
29insert into dataset testds({"name":"Messi"});
30insert into dataset testds({"name":"Tevez"});
31insert into dataset testds({"name":"Henry"});
32
33write output to nc1:"rttest/string_strlen03.adm";
34
35for $l in dataset('testds')
36order by $l.name
37return string-length($l.name)