blob: 9f923e7b9572fed20e8c0dd3d897ddc7200659df [file] [log] [blame]
/*
* Testcase Name : c2c.aql
* Description : Insert data into target datase by doing a select on source dataset.
* : Here both source and target datasets are internal datasets
* Success : Yes
* Date : 23rd May 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TestType as closed {
id:int32,
description:string,
name:string
}
// source dataset
create dataset T1(TestType) primary key id;
// target dataset
create dataset T2(TestType) primary key id;
insert into dataset T1({
"id":1234,
"description":"donut",
"name":"Cake"
}
);
insert into dataset T2(for $l in dataset("T1") return $l );
for $d in dataset("T2")
order by $d.id
return $d