r - R -- RJDBC 无法重命名 SQL 选择中的列
问题描述
使用 RJDBC 库似乎无法重命名 SQL 选择中的列。有人知道它的解决方法吗?我发现这个 useJDBC4ColumnNameAndLabelSemantics=true 用于 Db2,但不确定它是否可以在 R 中使用。
Select
a.customer,
b.customer as main_customer, <-- returns as customer not main_customer
b.customer_email
from customer a,
main_customer b
where a.customer_id = b.customer_id
解决方案
找到这个 ->使用 Oracle SQL 开发人员查询 IBM DB2 的列别名
例如,在我的情况下,数据库名称是 SAMPLE,如果我希望应用程序显示我的查询中的相关 ID 名称,那么我使用数据库名称:
SAMPLE:useJDBC4ColumnNameAndLabelSemantics=No;
推荐阅读
- r - 如果 R 模拟研究中的错误声明
- flutter - 无法解析配置“:app:debugRuntimeClasspath”的所有文件
- java - 如何使用 C# Unity 进行 whatsapp 视频通话
- html - 引导选项卡的深层链接
- angular - 角 | 在 innerHTML 中动态添加组件
- reactjs - 在没有 CDN 的微前端包之间共享反应
- python - PySimpleGUI 由于使用 Jpype 的后台任务而冻结并且不能使用多线程
- reactjs - 为什么重定向会在我的 iOS 上的 PWA 中显示浏览器 chrome
- c++ - C++ 在函数参数中为整数设置最大数的最佳方法是什么
- c# - 记录 ITFoxtec 时出现 CORS 错误