---
title: "CSVENCODE"
description: "La funzione SQL CSVENCODE restituisce il testo di input codificato come CSV in conformit\u00E0 con RFC 4180."
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/docs/invantive-universalsql/grammar/sql-functions/csvencode
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/csvencode
updated: 2026-12-02T12:07:25Z
license: https://documentation.invantive.eu/it/
---

## Sintassi
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> CSVENCODE[CSVENCODE]:::quoted
    CSVENCODE --> End((END))
```

## Scopo
La funzione SQL `CSVENCODE` restituisce il testo di input codificato come CSV in conformità con [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180):
- separatore di campo `,`
- separatore di record CR, LF e CR/LF
- carattere di virgolettatura `"`
- carattere di virgolettatura con escape `\"`
- nessuna intestazione

Vedi anche [[CSVDECODE]].

Parametri:
- Input (`varchar2`): l'input che verrà codificato in CSV a partire dal testo.

Restituisce: un testo che è l'input codificato come CSV come `varchar2`.

## Esempi
Il seguente esempio recupera la rappresentazione CSV del valore `a,b,c,d`:
```sql
select csvencode('a,b,c,d')

----------------
"a,b,c,d"
```
Il seguente esempio recupera la rappresentazione CSV del valore `text`:
```sql
select csvencode('text')

----------------
text
```

