Marcado: CLOB. PL/SQL
- Este tópico contém 32 respostas, 3 vozes e foi atualizado pela última vez 2 meses atrás por lucianalopes.
-
AutorPosts
-
7 de outubro de 2024 às 9:30 pm #177921lucianalopesParticipante
Jose boa noite,
Segue o codigo abaixo, que funcionou na gravação do xml na linha
declare
testo2 clob;
textoinsere varchar2(32767);
begin
dbms_lob.createtemporary(testo2,true);
textoinsere:='<root>
<items>
<item>
<name>Item 1</name>
<description>This is a detailed description of item 1. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 1s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 2</name>
<description>This is a detailed description of item 2. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 2s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 3</name>
<description>This is a detailed description of item 3. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 3s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 4</name>
<description>This is a detailed description of item 4. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 4s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 5</name>
<description>This is a detailed description of item 5. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 5s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 6</name>
<description>This is a detailed description of item 6. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 6s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 7</name>
<description>This is a detailed description of item 7. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 7s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 8</name>
<description>This is a detailed description of item 8. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 8s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 9</name>
<description>This is a detailed description of item 9. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 9s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 10</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 11</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 12</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 13</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 14</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 15</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 16</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 17</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 18</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item><item>
<name>Item 19</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 20</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 21</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 22</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 23</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 24</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 25</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 26</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 27</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 28</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 29</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item><item>
<name>Item 1</name>
<description>This is a detailed description of item 1. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 1s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 2</name>
<description>This is a detailed description of item 2. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 2s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 3</name>
<description>This is a detailed description of item 3. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 3s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 4</name>
<description>This is a detailed description of item 4. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 4s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 5</name>
<description>This is a detailed description of item 5. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 5s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 6</name>
<description>This is a detailed description of item 6. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 6s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 7</name>
<description>This is a detailed description of item 7. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 7s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 8</name>
<description>This is a detailed description of item 8. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 8s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 9</name>
<description>This is a detailed description of item 9. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 9s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 10</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 11</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 12</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 13</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 14</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 15</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 16</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 17</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 18</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item><item>
<name>Item 19</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 20</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 21</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 22</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 23</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 24</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 25</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 26</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
<item>
<name>Item 27</name>
<description>This is a detailed description of item 10. This description is deliberately long to ensure the XML document reaches the required length. This part of the description provides information about item 10s features, benefits, and usage scenarios. It is important to have a comprehensive description to fully explain the item.</description>
</item>
</items>
</root>’;
dbms_lob.writeappend(testo2,length(textoinsere),textoinsere);
insert into T_clob(id, nome, texto) values(6116,’teste’,testo2);
dbms_lob.freetemporary(testo2);end;
8 de outubro de 2024 às 8:38 am #177924José Laurindo ChiappaModeradorBom, eu não costumo usar dbms_lob.writeappend mas ok, se funcionou, maravilha… Agora, REPITO : uma vez o XML carregado para um clob, para vc ler os dados Separados por TAG, vc VAI ter que programar usando os built-ins de XML, em especial o XMLTABLE – até onde sei, como eu disse, Não Tem um comando/funcionalidade PL/SQL que te faça isso de uma vez…
Estude os links que te passei que certamente vc DEVE conseguir chegar lá, não deve ser, acredito, um código extremamente complexo, longe disso…
Abraços,
José Laurindo Chiappa
OBS : claro, só para conhecimento, Obviamente a Esmagadora Maioria das boas tools clientes Oracle (Oracle SQL Developer É uma delas, SQLcl é outra) POSSUEM uma GUI/uma opção/comando para carregar um arquivo XML com cada TAG indo numa coluna diferente, mas Entendo que no seu caso vc quer fazer isso Programaticamente, Repetidamente, então a opção de carga manual via tool Não te serve, neste caso vais ter que codificar um pouquinho…
8 de outubro de 2024 às 9:30 am #177925lucianalopesParticipanteBom dia Jose,
Obrigado vou dar uma olhada e te dou um retorno.
-
AutorPosts
- Você deve fazer login para responder a este tópico.