Statement stmt1 = null;
ResultSet srs1 = null;
List3 = new ArrayList<String>();
stmt1 = conn.createStatement();
srs1 = stmt1 .executeQuery("SELECT [FILE_ACL].[FILE_SYSTEM_ID],
[USER_LITE].[USERS].[SYS_ID] FROM [FILE_ACL],
[USER_LITE].[USERS] WHERE [FILE_ACL].[PEOPLE_SYSTEM_ID]
= 'u' AND [USER_LITE].[USERS].[SYS_ID]
= [FILE_ACL].[PEOPLE_SYSTEM_ID]");
while (srs1.next()) {
List3.add(srs1.getString("FILE_SYSTEM_ID"));
}
System.out.println(List3);
我从你那里得到你
for (int u = 2; u < List1.size(); u++) {
System.out.println(List1.get(u));
}
它返回我一个整数
================================================== ======================
但我遇到此错误将数据类型varchar转换为数字时出错。
有什么解决办法吗?
谢谢!
最佳答案
Implicit conversion from datatype
'VARCHAR' to 'NUMERIC' is not allowed. Use the CONVERT function to run
this query.
关于java - 将数据类型varchar转换为数值,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20367817/