blob: 5266fa19bc521dfbc8d3cc4891bd09bb9bc31f08 [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
ramangrover29669d8f62013-02-11 06:03:32 +000020create dataset testds(TestType) primary key id;
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +000021
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]) }