如何从Oracle Apex中的复选框组中插入多个值?

发布于 2025-02-08 00:55:01 字数 96 浏览 2 评论 0原文

我有一个订单表(id_order,id_category)和类别表(id_category,Description)。 如何在Oracle Apex应用中插入订单,超过1类类别?

I have an order table(id_order,id_category) and category table(id_category,description).
How can I insert to an order, more than 1 type of category in oracle Apex app?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

失眠症患者 2025-02-15 00:55:01

一种选择是使用班车项目;它可以让您轻松地将所需类别从其从左到右移动。结果是一个半彩色的值列表。例如,如果您选择类别1、5和7,则结果为1; 5; 7 so-,以便将它们正确地插入 中代码>表,您首先必须将它们拆分为行。

如何?使用apex_string.split

SQL> select * from table(apex_string.split('1;5;7', ';'));

COLUMN_VALUE
--------------------------------------------------------------------------------
1
5
7

SQL>

所有行将共享相同的order_id,我假设(序列可能是其值的不错选择)。

One option is to use a shuttle item; it'll let you easily move desired categories from its left to right side. The result is a semi-colon separated list of values. For example, if you chose categories 1, 5 and 7, result is 1;5;7 so - in order to insert them properly into the order table, you'll first have to split them to rows.

How? Use apex_string.split:

SQL> select * from table(apex_string.split('1;5;7', ';'));

COLUMN_VALUE
--------------------------------------------------------------------------------
1
5
7

SQL>

All rows would share the same order_id, I presume (a sequence might be a good choice for its value).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文