|
发表于 2014-4-16 11:51:32
|
显示全部楼层
hbyczg 发表于 2014-4-16 10:15
显示附件的代码是写在那里的啊?我是新 人,能否说得详细一点
参考- String ksql = "select fj.fName, fj.fFJ from AP_FJ fj ";
- Table table = KSQL.select(ksql, null, "/appdemo/test/data", null);
- Iterator<Row> it = table.iterator();
- while (it.hasNext()) {
- Row r = it.next();
- String fj = r.getString("fFJ");
- JSONArray jsonArray = new JSONArray(fj);
- String fileName = "";
- for (int i = 0; i < jsonArray.length(); i++) {
- JSONObject jsonObj = jsonArray.getJSONObject(i);
- fileName += jsonObj.get("docName");
- }
- System.out.println(fileName);
- r.setValue("fFJ", fileName);
- }
- return table;
复制代码 |
|