## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> | | VIES_EU_VAT_COUNTRY[VIES_EU_VAT_COUNTRY]:::quoted VIES_EU_VAT_COUNTRY --> End((END)) ``` ## Purpose The `VIES_EU_VAT_COUNTRY` SQL function evaluates to text of the country linked to the EU VAT account provided (when the EU VAT account is valid and active). Each validation takes approximately 250 ms and uses the VIES service offered by the European Union. See also [[IS_VIES_EU_VAT]], [[VIES_EU_VAT_ADDRESS]] and [[VIES_EU_VAT_NAME]]. Parameters: - Value (`varchar2`): value to test. Returns: country associated with the EU VAT account. `null` when not a valid/active EU VAT account. ## Examples The following example retrieves the country linked to the EU VAT account `NL812602377B01`: ```sql select vies_eu_vat_country('NL812602377B01') ------------------- NL ``` The following example shows that a `null` EU VAT account evaluates to `null`: ```sql select vies_eu_vat_country(null) ------------------- ```