我的要求是表的清單列表,循環列表需要從映射表&調用表名了android表名時:SQlite的From子句SELECT語句
看到我的查詢:
SELECT * FROM SELECT ToTable FROM RDSynchronisationControlHeader
WHERE FromTable ='RD.TransactionControl'
當我從查詢瀏覽器運行此查詢時,這不工作? 我們不能在from子句中使用select語句嗎?
private boolean isTableRecords(String tablename){
DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(this);
boolean recordStatus = false;
try {
dbAdapter.createDataBase();
} catch (IOException e) {
Log.i("*** select ",e.getMessage());
}
dbAdapter.openDataBase();
String query = "SELECT * FROM SELECT ToTable FROM RDSynchronisationControlHeader WHERE FromTable ='?';";
String[]d = new String[]{tablename};
ArrayList stringList = dbAdapter.selectRecordsFromDBList(query, d);
dbAdapter.close();
ArrayList<Object> wmRouteList = new ArrayList<Object>();
recordStatus = stringList.size() >0 ? true : false;
return recordStatus;
}
請幫助我..
在此先感謝
明確的問題帶來更快的答案。所以你需要一個查詢,將從列表中選擇名稱的列表中選擇? – Rasel