AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1701954
Accepted
questionto42standswithUkraine
questionto42standswithUkraine
Asked: 2022-01-29 10:23:52 +0800 CST2022-01-29 10:23:52 +0800 CST 2022-01-29 10:23:52 +0800 CST

DBeaver "Format" --> "Format SQL" --> "To Upper Case" 适用于所有单词。如何仅格式化系统保留的 SQL 命令字?

  • 772

当我右键单击选定的 SQL 查询并选择“格式化 SQL”时,它会将 SQL 更改为小写。

另一个命令“To upper case”不是 SQL 智能的,这意味着它将选择中的所有内容都更改为大写,因此名称中也不会使用“SQL”来调用它。

在此处输入图像描述

查询本身不区分大小写,并在 SQL 中运行,全局更改为大写或小写,但是使用 SQL 查询结果的外部 Python 函数在将其设为大写时无法再找到所需的列,因为它搜索小写的 column_name。

这导致我的前端出现以下错误:


AttributeError

AttributeError: 'Source' object has no attribute 'schedule_day'
Traceback (most recent call last)

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__

    return self.wsgi_app(environ, start_response)

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app

    response = self.make_response(self.handle_exception(e))

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception

    reraise(exc_type, exc_value, tb)

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app

    response = self.full_dispatch_request()

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request

    rv = self.handle_user_exception(e)

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception

    reraise(exc_type, exc_value, tb)

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request

    rv = self.dispatch_request()

    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

    File "/monitoring/app.py", line 149, in show_broken_sources

    if source.schedule_day is None:

    AttributeError: 'Source' object has no attribute 'item_day'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

    dump() shows all variables in the frame
    dump(obj) dumps all that's known about the object

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

有没有办法只为 SQL command words更改为大写,最好是默认情况下?

text-formatting sql
  • 1 1 个回答
  • 969 Views

1 个回答

  • Voted
  1. Best Answer
    questionto42standswithUkraine
    2022-01-29T10:23:52+08:002022-01-29T10:23:52+08:00

    转到文件--> 属性--> 编辑器--> SQL 编辑器--> 格式。您甚至可以选择数据源的设置、全局设置或外部设置。

    在此处输入图像描述

    就我而言,在“默认格式化程序”中,选择“上”,您可以使用Ctrl+ Shift+使用此格式化程序F

    • 0

相关问题

  • 将 SQL Anywhere 设置为不自动交叉连接

  • 尝试连接到 MSSQL 2014 Management Studio 中的服务器时,如果服务器名称为空,我应该安装什么?

  • 如何让 Atom 突出显示嵌入在 python 多行注释中的 SQL?

  • MS Word – 如何在每页的右边缘插入一列

  • 如何在 Telerik 报告中使用重复表头在第二页的页眉和内容之间添加(垂直)边距(即填充)

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 为什么通过电缆(同轴电缆)的千兆位/秒 Internet 连接不能像光纤一样提供对称速度? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve