blob: ddff7ed7fffe1d4108c49647da65623552cbefbf [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
ramangrover29669d8f62013-02-11 06:03:32 +000018create dataset testds(TestType) primary key name;
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +000019
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)