blob: 0b3941dc063fa1ebacfb4a4009b14e1d4b51dedb [file] [log] [blame]
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +00001/*
2 * Test case Name : strconcat01.aql
3 * Description : Test string-concat([string]) function.
4 * : Pass the strings(which are in internal dataset) to string-concat function for concatenation.
5 * Success : Yes
6 * Date : 16th April 2012
7 */
8
9
10drop dataverse test if exists;
11create dataverse test;
12use dataverse test;
13
14create type TestType as open{
15id:int32,
16fname:string,
17lname:string
18}
19
20create dataset testds(TestType) partitioned by key id;
21
22// insert string data into internal dataset testds into the name attribute
23
24insert into dataset testds({"id":123,"fname":"John","lname":"Smith"});
25insert into dataset testds({"id":124,"fname":"Bob","lname":"Jones"});
26insert into dataset testds({"id":125,"fname":"Mike","lname":"Carey"});
27insert into dataset testds({"id":126,"fname":"Chen","lname":"Li"});
28insert into dataset testds({"id":121,"fname":"Young Seok","lname":"Kim"});
29insert into dataset testds({"id":122,"fname":"Alex","lname":"Behm"});
30insert into dataset testds({"id":127,"fname":"Raman","lname":"Grover"});
31insert into dataset testds({"id":128,"fname":"Yingyi","lname":"Bu"});
32insert into dataset testds({"id":129,"fname":"Vinayak","lname":"Borkar"});
33
34write output to nc1:"rttest/string_strconcat01.adm";
35
36for $l in dataset('testds')
37order by $l.id
38return { "Full Name": string-concat([$l.fname,$l.lname]) }