-1

我正在尝试遵循 SQL:

SELECT REGEXP_SUBSTR ('00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:', '[^,]+', 1, LEVEL) FROM DUAL CONNECT BY REGEXP_SUBSTR ('00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:', '[^,]+', 1, LEVEL) IS NOT NULL;

这给出了 ORA-01704: string literal too long。

我理解传递的字符串超过 4000 个字符的原因,但我想在 PL/SQL 块中处理这么多记录。字符串只不过是从 UI 传递到 oracle 过程的逗号分隔值。

例如:

00102034334:15:11-JUN-13 ~ ord_no:order_line_no:Date (1 order can have many order lines , parent-child relationship)

当我在 SQL 上使用 into 子句时,在 PL/SQL 表类型变量中。

这对我来说是个错误。

我该怎么走?在这种情况下,是否有任何其他方式可以将参数从 UI 传递到 Oracle。

4

2 回答 2

1

PL/SQL 字符串最多可以包含 32767 个字符,如果要使用 PL/SQL 处理字符串,请在过程中使用 varchar2(32767)。如果 32767 个字符仍然太短,只需将您的字符串作为 clob 传递,CLOB 的长度是无限的。

declare
  long_varchar varchar2( 32767 );
  v_clob clob;
begin
  long_varchar := q'@[00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:', '[^,]+', 1, LEVEL) FROM DUAL CONNECT BY REGEXP_SUBSTR ('00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:@';
  v_clob := long_varchar;
  long_varchar := REGEXP_SUBSTR ( long_varchar, '[^,]+');
  v_clob := REGEXP_SUBSTR ( v_clob, '[^,]+');
  DBMS_OUTPUT.PUT_LINE( long_varchar );
  DBMS_OUTPUT.PUT_LINE( v_clob );
end;
/

    ---- result ----
[00102034334:1:11-JUN-13:1
[00102034334:1:11-JUN-13:1


于 2013-08-06T18:15:33.613 回答
1

对于非常长的字符串,将要处理的数据存储在 CLOB 类型变量中,并通过传递 CLOB 类型变量使用 REGEXP_SUBSTR 解析数据。

declare
v_clob clob;
begin
v_clob := '00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:,00102034334:1:11-JUN-13:1,00102034334:2:11-JUN-13:1,00102034334:3:11-JUN-13:1,00102034334:4:11-JUN-13:1,00102034334:5:11-JUN-13:,00102034334:6:11-JUN-13:,00102034334:7:11-JUN-13:,00102034334:8:11-JUN-13:,00102034334:9:11-JUN-13:,00102034334:10:11-JUN-13:,00102034334:11:11-JUN-13:,00102034334:12:11-JUN-13:,00102034334:13:11-JUN-13:,00102034334:14:11-JUN-13:,00102034334:15:11-JUN-13:,00102034334:16:11-JUN-13:,00102034334:17:11-JUN-13:,00102034334:18:11-JUN-13:,00102034334:19:11-JUN-13:,00102034334:20:11-JUN-13:,00102034334:21:11-JUN-13:,00102034334:22:11-JUN-13:,00102034334:23:11-JUN-13:,00102034334:24:11-JUN-13:,00102034334:25:11-JUN-13:,00102034334:26:11-JUN-13:,00102034334:27:11-JUN-13:,00102034334:28:11-JUN-13:,00102034334:29:11-JUN-13:,00102034334:30:11-JUN-13:,00102034334:31:11-JUN-13:,00102034334:32:11-JUN-13:,00102034334:33:11-JUN-13:,00102034334:34:11-JUN-13:,00102034334:35:11-JUN-13:';
select TO_CHAR (regexp_substr(v_clob,'[^,]+', 1, level)) from dual 
               connect by TO_CHAR (regexp_substr(v_clob, '[^,]+', 1, level)) is not null;                       

end;
/
于 2018-06-26T15:40:20.453 回答