ORA-12704: character set mismatch in case statement

I met this issue when I SELECT CASE WHEN d.COUNTRY != 'AU' THEN 'Australia' ELSE countries.NAME END

BTW, I asked ChatGPT for help about this issue but unfortunately I didn't get a good answer.
One of the correct answers was

SELECT CASE WHEN d.COUNTRY != 'AU' THEN 'Australia' ELSE TO_CHAR(countries.NAME) END ...

I found the above answer myself and I told ChatGPT this answer. It replied

Great to hear that you were able to solve the issue! Yes, you can use the TO_CHAR function to convert the character set of the countries.NAME column to match the character set of your database. This is a common solution for character set mismatch errors. Using TO_CHAR function, you can explicitly specify the character set you want to convert to, like this:

TO_CHAR(countries.NAME, 'NLS_CHARACTERSET')

where 'NLS_CHARACTERSET' is the character set of your database. By default, Oracle uses the database's character set for character data that has no specified character set, so if you don't specify a character set for TO_CHAR, it will use the database's character set.

another answer is to use the CAST function in PL/SQL, here's an example from stackoverflow.com

发布 Game scripting mastery 中文精要 - 第八章

Game scripting mastery 是一本不可多得的好书,除了写得啰嗦。

豆瓣网友 全棧法師张解靈 2018-08-01 16:37:13 写道:
说实话,难看。 但是内容完全没问题,就是实在太啰嗦了,即使英语原著也是...看得有点难受,想跳呢又怕错过好东西,想慢慢看呢又...还是慢慢啃吧 如果谁重排一个脱水版,我绝对打满分

另一个网友 TerryX 2017-01-06 18:44:19 写道:
这本书可以说是被严重低估,可能因为这个专职院校味道的书名。从第9章开始简直不能再好,从编译器底层到高级虚拟机一气呵成。这本书真不仅仅是教你做游戏,而是教你怎么成为master。

所以我启动了这个脱水版项目:初步计划是从第8章开始到全书结束,借助chatGPT神力完成这个项目,希望不要烂尾。

哦,点击本文标题,或者这里,查看第八章全文。 对了,这个项目在gitHub上。如果你发现有可改进之处,欢迎改进并提交PR。

不确定是不是真的有用,但还是记下来备忘

毕竟自己和父母都会老去,老年痴呆症离我们并不是很遥远。

读《最初的爱,最后的故事》时读到:

在老年痴呆症的早期,特别是对于素食主义者,检查他们血液中的维生素B12的水平,若发现大幅低于正常范围, 注射维生素B12看看效果。若有效果可适当加大剂量并定期补充维生素B12,有病例从痴呆状态复原,智力恢复正常,又健康的活了好几年。

fcitx on debian 11/debian 12 missing tray icon solution:

This is because Debian 11/Debian 12 with Gnome does not ship with the packages to display tray icons. To install and enable the correct packages to display tray icons, run the following command:

sudo apt install gnome-shell-extension-appindicator

Then either reboot or log out and back in to Gnome, and run the following command:

gnome-extensions enable [email protected]

Reference

Toshiba chromebook2 CB35-B3340 / Dell Chromebook 11 P22T: Debian 11 setup

I managed to set up debian 11 on a Toshiba Chromebook2, model CB35-B3340 and a Dell Chromebook 11 3120 P22T00 WIFI/Sound/HDMI all work well, which satisfies me.

  • Firstly, switch Chromebook into developer mode

    • Visit Debian and use dd command to create a bootable usb stick with a minimal iso
  • Visit MrChromebox

    • Install/Update UEFI (Full ROM) firmware (the Sea bios)
  • Boot from the usb stick and setup the minimal system

    • Allow debian use all 15G space with LVM, no separate partitions
    • Skip wifi setup as we don't have the firmware at that moment
  • Boot from the chromebook into debian without GUI, without network

  • Plug a usb realteck 8139 ethernet card and so I get internet connection:

    • add non-free and main contrib source line to /etc/apt/sources.list file:

deb http://mirror.fsmg.org.nz/debian bullseye main contrib non-free

  • apt install firmware-iwlwifi, firmware-intel-sound

  • apt install gnome-core (wifi works from now)

  • plug off the usb ethernet card and reboot

    • wifi works
  • Other settings

    • Remove old kernels to save space, Help Reference
    • Settings => Power => Disable auto suspend when plug in
    • Run sudo apt clean
    • Restrict journal log max size by vim /etc/systemd/journald.conf and uncomment the SystemMaxUser=50M line, and then systemctl restart systemd-journald