활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi, I have enrichment with all the data i want.
Now i am trying to insert into table through java script. I dont want to use update sql activity due to some table transformation. How do i derive the data which populated in enrichment in java script. For ex
sqlExec("insert into gow:SampleDB(std_id,name) select std_id, name from vars.targetSchema");
i want std_id and name from enrichment table.
해결되었습니다! 솔루션으로 이동.
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
조회 수
답글
좋아요 수
Hi,
you can use queryDef to fetch the data from targetSchema as shown below
var conditionVar="@age > 25";// example condition
var recordSet = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@std_id"/>
<node expr="@name"/>
</select>
<where>
<condition expr={conditionVar} />
</where>
</queryDef>
);
var allRecords = recordSet.ExecuteQuery();
for each (var rec in allRecords)
{
var var1=rec.std_id;
var var2=rec.name;
//your INSERT statement;
}
hope this helps.
Hi,
you can use queryDef to fetch the data from targetSchema as shown below
var conditionVar="@age > 25";// example condition
var recordSet = xtk.queryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@std_id"/>
<node expr="@name"/>
</select>
<where>
<condition expr={conditionVar} />
</where>
</queryDef>
);
var allRecords = recordSet.ExecuteQuery();
for each (var rec in allRecords)
{
var var1=rec.std_id;
var var2=rec.name;
//your INSERT statement;
}
hope this helps.
조회 수
답글
좋아요 수
Hi,
You can use an update db activity to update the db. Fetching and inserting a row at a time via the app server won't be efficient.
What's the transformation?
Thanks,
-Jon
조회 수
답글
좋아요 수
ID FirstName LastName Email
1 Name1 Name12 Email1
2 Name2 Name22 Email2
3 Name3 Name32 Email3
i want to convert above table into
ID AttributeName AttributeValue
1 FirstName Name1
1 LastName Name12
1 Email Email1
2 FirstName Name2
2 LastName Name22
2 Email Email2
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
Likes
답글