oracle中的多个字符串
我想从下表在oracle中生成多个字符串 我不知道如何做到这一点,但检查我的董事会应该适合我像下面的附件。 任何建议都将感谢您的帮助oracle中的多个字符串,oracle,Oracle,我想从下表在oracle中生成多个字符串 我不知道如何做到这一点,但检查我的董事会应该适合我像下面的附件。 任何建议都将感谢您的帮助 |20022869| 17/04/2010 03:12| 8LSFE| SANDST| paper. ABFRN | |20022869| 17/04/2010 03:12| 7LSFE| SANDST| d by drummer Lars Ulrich in a local news
|20022869| 17/04/2010 03:12| 8LSFE| SANDST| paper. ABFRN |
|20022869| 17/04/2010 03:12| 7LSFE| SANDST| d by drummer Lars Ulrich in a local news |
|20022869| 17/04/2010 03:12| 6LSFE| SANDST| ield responded to an advertisement poste |
|20022869| 17/04/2010 03:12| 5LSFE| SANDST| 1981 when vocalist/guitarist James Hetf |
|20022869| 17/04/2010 03:12| 4LSFE| SANDST| ed by drummer Lars Ulrich in a formed in |
|20022869| 17/04/2010 03:12| 3LSFE| SANDST| ifornia. Metallica wasadvertisement post |
|20022869| 17/04/2010 03:12| 2LSFE| SANDST| vy metal band formed in Los Angeles, Ca |
|20022869| 17/04/2010 03:12| 1LSFE| SANDST| 014422236087Metallica is an American hea |
|20023532| 18/04/2010 09:20| 8LSTX| SANDST| 06 by Max Planck CATAR |
|20023532| 18/04/2010 09:20| 7LSTX| SANDST| ory" (German: Relativtheorie) used in 19 |
|20023532| 18/04/2010 09:20| 6LSTX| SANDST| as based on the expression "relative the |
|20023532| 18/04/2010 09:20| 5LSTX| SANDST| tivity The term "theory of relativity" w |
|20023532| 18/04/2010 09:20| 4LSTX| SANDST| ein: special relativity and general rela |
|20023532| 18/04/2010 09:20| 3LSTX| SANDST| encompasses two theories by Albert Einst |
|20023532| 18/04/2010 09:20| 2LSTX| SANDST| r simply relativity in physics, usually |
|20023532| 18/04/2010 09:20| 1LSTX| SANDST| 018717142175 The theory of relativity, o |
大概是这样的:
select '|2002'||cast(client as char(4))||'|'||chr(9)||cast(dat as char(20))||'|'||chr(9)
||cast(secuence as char(1))||cast(cod1 as char(2))||cast(cod2 as char(2))||
'|'||chr(9)||cast(personal as char(6))||'|'||chr(9)|| cast((area||phone||' '||comments)
as char(180))||chr(9)||'|'
from test;
但是,在您的示例中,最好为个人6个符号指定长度,为代码指定长度。您能更具体地说明您要做什么吗,您尝试了什么?Customer列必须连接您的左常量2002列,称为secuence,应该从1开始,而不是从零开始。CoD1和cod2列必须连接,并从1LSFE、2LSFE等开始填充上述序列,因为源表显示blank不遵循序列。包含该列的SAND在整个列中是一个常量。最后一列必须仅显示原始文本,但仅限于40个字符,并且该行循环尊重它。您希望如何实现这一点?pl/sql,shell脚本?我希望在运行上次查询ORA-00936:缺少表达式:编写注释而不是注释时,使用select fromexcuseme将其部署为oracle sql developer中的查询;)
select '|2002'||cast(client as char(4))||'|'||chr(9)||cast(dat as char(20))||'|'||chr(9)
||cast(secuence as char(1))||cast(cod1 as char(2))||cast(cod2 as char(2))||
'|'||chr(9)||cast(personal as char(6))||'|'||chr(9)|| cast((area||phone||' '||comments)
as char(180))||chr(9)||'|'
from test;