blob: 0b3941dc063fa1ebacfb4a4009b14e1d4b51dedb [file] [log] [blame]
/*
* Test case Name : strconcat01.aql
* Description : Test string-concat([string]) function.
* : Pass the strings(which are in internal dataset) to string-concat function for concatenation.
* Success : Yes
* Date : 16th April 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TestType as open{
id:int32,
fname:string,
lname:string
}
create dataset testds(TestType) partitioned by key id;
// insert string data into internal dataset testds into the name attribute
insert into dataset testds({"id":123,"fname":"John","lname":"Smith"});
insert into dataset testds({"id":124,"fname":"Bob","lname":"Jones"});
insert into dataset testds({"id":125,"fname":"Mike","lname":"Carey"});
insert into dataset testds({"id":126,"fname":"Chen","lname":"Li"});
insert into dataset testds({"id":121,"fname":"Young Seok","lname":"Kim"});
insert into dataset testds({"id":122,"fname":"Alex","lname":"Behm"});
insert into dataset testds({"id":127,"fname":"Raman","lname":"Grover"});
insert into dataset testds({"id":128,"fname":"Yingyi","lname":"Bu"});
insert into dataset testds({"id":129,"fname":"Vinayak","lname":"Borkar"});
write output to nc1:"rttest/string_strconcat01.adm";
for $l in dataset('testds')
order by $l.id
return { "Full Name": string-concat([$l.fname,$l.lname]) }