我试图将字符串的一部分作为整数排序,CAST(pid AS SIGNED)
但没有成功。
我想我需要这样的伪代码:CAST ON REGX('^islandora(/d?)$') OF pid AS SIGNED
doFields
表具有以下结构:
+---------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| pid | varchar(64) | NO | MUL | NULL | |
| ownerId | varchar(255) | YES | | NULL | |
+---------------+--------------+------+-----+---------+-------+
这是样本数据:
+----------------+---------+
| pid | ownerId |
+----------------+---------+
| islandora:1050 | 8 |
| islandora:1052 | 8 |
| islandora:1053 | 8 |
| islandora:1054 | 8 |
| islandora:1055 | 8 |
+----------------+---------+