---
title: "Identificatore sconosciuto \u2018COMPANY_CODE"
language: it
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/it/forum/4871/unknown-identifier-company-code
original: https://documentation.invantive.eu/en/forum/4871/unknown-identifier-company-code
updated: 2026-12-03T20:06:13Z
license: https://documentation.invantive.eu/it/
---

# Identificatore sconosciuto ‘COMPANY_CODE

Quando eseguo una richiesta nell'editor UniversalSQL:

```
select *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions
       ( COMPANY_CODE = 'compcode'
       )
```

ottengo il seguente messaggio di errore:

> itgensql001
> Identificatore sconosciuto ‘COMPANY_CODE’.
> Non esistono identificatori simili.

Mentre la tabella sembra proprio richiedere questo elemento:

```
select *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions
       ( :COMPANY_CODE                  -- Partition to retrieve data from.
       , :branch                        -- The branch CD
       , :ledger                        -- Mandatory. The ledger in which you want to view the account balances.
       , :fromPeriod                    -- The financial period that begins the date range of the batches you want to view. Format YYYYPP
       , :toPeriod                      -- The financial period that ends the date range of the batches you want to view. Format YYYYPP
       , :account                       -- The account CD for which you want to view activities in the selected financial period.
       , :subaccountId                  -- The Subaccount
       , :fromDate                      -- The first date of the interval within the period. Format YYYY-MM-DD
       , :toDate                        -- The last date of the interval within the selected period. Format YYYY-MM-DD
       , :includeUnposted               -- Checkmark indicating if unposted batches are included.
       , :includeUnreleased             -- Checkmark indicating if unreleased (balanced) batches are included.
       , :skipRecords                   -- This field has been deprecated and will be removed in future versions. Use pagenumber and pagesize for pagination purposes. Pagenumber and pagesize does not work with NumberToRead and SkipRecords.
       , :numberToRead                  -- This field has been deprecated and will be removed in future versions. Use pagenumber and pagesize for pagination purposes. Pagenumber and pagesize does not work with NumberToRead and SkipRecords.
       , :lastModifiedDateTime          -- This value, generated by the system, indicates the last time the record was modified. Use it to retrieve all records that have been modified since that time, up to the present.  Accepted format: * ```yyyy-MM-dd``` * ```yyyy-MM-dd HH:mm:ss``` * ```yyyy-MM-dd HH:mm:ss.FFF``` * ```yyyy-MM-ddTHH:mm:ss``` * ```yyyy-MM-ddTHH:mm:ss.FFF```  _Note:_ __LastModifiedDateTime__ and __LastModifiedDateTimeCondition__ are __mutually inclusive__.
       , :lastModifiedDateTimeCondition -- This value represents the condition to be applied when retrieving records.  Accepted values (without the single quotes): * '&gt;' for greater than * '&lt;' for less than * '&gt;=' for greater than or equal * '&lt;=' for less than or equal  _Note:_ __LastModifiedDateTime__ and __LastModifiedDateTimeCondition__ are __mutually inclusive__.
       , :expandAccountInfo             -- By default, if no value is provided, False and the account information will include only Number, Description, Type and GlConsolAccountCD. If True, each transaction returned will include extended information about account.
       , :expandBranchInfo              -- By default, if no value is provided, False and branch information will include only branch number. If True, each transaction returned will include extended information about Branch (number and name).
       , :includeTransactionBalance     -- By default, if no value is provided, False and the transactions returned will not include their balances (fields BegBalance, EndingBalance, CurrBegBalance, CurrEndingBalance) If True, each transaction returned will include its balance.
       , :pageNumber                    -- Pagination parameter. Page number.
       , :pageSize                      -- Pagination parameter. Number of items to be collected. Please use a page size lower or equal to the allowed max page size which is returned as part of the metadata information. If requested page size is greater than allowed max page size, request will be limited to max page size.
       , :erp-api-background            -- If a URL value is provided, then API endpoint will be queued and executed in background. When the execution of the background operation is finished, the system will POST the response to the specified URL. The endpoint itself responds in this case with a 202-Accepted status and a reference to a state document for the background operation.
       )
```

Se uso parametri senza nome funziona, ma con questo non posso ottenere ciò che voglio ottenere (ossia non compilare tutti i parametri).

Come devo eseguire la richiesta per ottenere comunque un risultato?

## Risposta accettata

Grazie per la segnalazione. Si tratta di un bug che deriva come danno collaterale dalla rimozione del confuso `COMPANY_CODE` come parametro di funzione tabella. Nella prossima release sarà apportato un miglioramento alle seguenti quattro viste:

- `GeneralLedgerBalancesAll`
- `GeneralLedgerTransactions`
- `JournalTransactionLines`
- `JournalTransactions`

Il supporto del vecchio protocollo di autenticazione VNI per [Visma.net](http://Visma.net) cessa definitivamente con questa versione 24.0.388 e successive.

Il consiglio è di usare temporaneamente la seguente query, specificamente su Invantive Cloud, invece della vista `GeneralLedgerTransactions` (per Invantive Bridge Online questo non è un problema perché usa una versione precedente):

```
select lgr.company_code
,      fpd.period
,      lgr.number ledger_number
,      lgr.description ledger_description
,      txn.* except period, ledger_id, ledger_description, company_code
from   VismaNet.Ledger.Ledgers lgr
join   VismaNet.FinancialPeriod.FinancialPeriods fpd
join   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions(ledger => lgr.number, fromPeriod => fpd.period, toPeriod => fpd.Period) txn
limit 100 /* Kies gewenst aantal. Voeg eventueel filter toe voor periode. */
```

## Rispondi 2

Utilizza il vecchio VNI come connessione a [Visma.net](http://Visma.net) o a Visma Connect?

## Rispondi 3

Le impostazioni nel mio container indicano `use-VNI=False`, quindi sospetto Visma Connect.

## Rispondi 4

[Visma.net](http://Visma.net) è passato di recente da VNI ([Visma.net](http://Visma.net) Interface) a Visma Connect. Uno svantaggio è che è possibile accedere a un massimo di 1 company (vedi anche [Migrating from Visma.net ERP Integrations (VNI) to Visma Connect for Visma.net](https://forums.invantive.com/t/migrating-from-visma-net-erp-integrations-vni-to-visma-connect-for-visma-net/4210)).

Il campo `COMPANY_CODE` è stato lasciato deliberatamente nelle righe, così da poter consolidare più aziende, nonostante le limitazioni, proprio come con SnelStart, come descritto in [Consolidare in tempo reale i dati di più amministrazioni SnelStart](https://forums.invantive.com/t/data-uit-meerdere-snelstart-administraties-real-time-consolideren/3689).

Tuttavia, per errore il campo `COMPANY_CODE` è rimasto presente come parametro di funzione tabella quando si usa Visma Connect. Questo avrebbe dovuto essere mostrato solo in caso di collegamento basato su VNI.

Nella prossima release il parametro della funzione di tabella `COMPANY_CODE` sarà stato rimosso dalle tabelle. Rimarrà presente solo la colonna di output. La disponibilità di questa release avviene come descritto in [Frequenza delle release di Invantive Cloud](https://forums.invantive.com/t/releasefrequentie-invantive-cloud/4713).

Per ora il consiglio è, quando si usano i parametri delle funzioni di tabella, di passare i valori per posizione come descritto in [Cosa sono le funzioni di tabella e i parametri delle funzioni di tabella?](https://forums.invantive.com/t/wat-zijn-tabelfuncties-en-tabelfunctieparameters/1316#tablefunctieparameters-6). Ad esempio `select ... from NAAM@platform( NAAM => WAARDE )`.

Infine, si noti che l'indicazione di valori per i parametri delle funzioni di tabella in generale non è necessaria su [Visma.net](http://Visma.net). Una clausola `where` o un filtro correttamente scelto in Power BI viene riscritto automaticamente per usare i parametri delle funzioni di tabella.

Qualora questa ottimizzazione delle prestazioni non funzionasse come previsto, aggiungere come risposta l'esatta istruzione SQL desiderata con i parametri delle funzioni di tabella e i valori.

## Rispondi 5

Nella sua risposta lei afferma quanto segue

> Per ora il consiglio è, quando si usano i parametri delle funzioni di tabella, di passare i valori per posizione come descritto in [Cosa sono le funzioni di tabella e i parametri delle funzioni di tabella?](https://forums.invantive.com/t/wat-zijn-tabelfuncties-en-tabelfunctieparameters/1316#tablefunctieparameters-6). Ad esempio `select ... from NAAM@platform( NAAM => WAARDE )` .

Quindi questo non funziona come ho mostrato nella mia prima richiesta. E anche la seguente non funziona:

> select top 10 *
> from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@platform
> (ledger = ‘EFFETTIVO’),

Ricevo un messaggio di errore.

Anche

> select top 10 *
> from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@platform
> where ledger = ‘effettivo’
> Restituisce un errore: è richiesto un valore per il parametro ‘ledger’ sulla tabella ‘VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions’. itgendid357

dove ho sostituito @platform con la piattaforma.

Quale azione posso intraprendere per ottenere comunque i risultati desiderati (la richiesta su una vista su generalledgertransactions dà un timeout perché contiene troppi dati, anche con un'istruzione where))_

## Rispondi 6

Per limitare il volume dei dati è possibile usare `limit` o `top`. Il motore SQL lavora, dove possibile, con dati in streaming, in modo che vengano recuperati solo i dati necessari.

Nota che i dati vengono recuperati in tempo reale. In alternativa è possibile lavorare copiando i dati in, ad esempio, SQL Server. La persona che ha ricevuto la spiegazione potrebbe essere in grado di fornirle ulteriori informazioni in merito.

Per la posizione per nome è necessario usare `=>` invece di `=`, come in:

```
select top 10 *
from   VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions@vnt
       ( ledger => 'WERKELIJK'
       , fromPeriod => '202010'
       , toPeriod => '202012'
       )
```

Infine, anche per le grandi amministrazioni in generale è più facile lavorare con la vista `GeneralLedgerTransactions`. I filtri su questi vengono in generale passati lungo tutta la catena («filtraggio lato server»).

## Rispondi 7

Grazie, se vogliamo usare la vista con la seguente query (nell'editor online):

```
select top 10 *
from   VismaNet.Views.GeneralLedgerTransactions
```

otteniamo il risultato seguente:

![immagine](/img/edc1b68dfaf15778c780ac6a5df12277edf07bb1493efb029bcae50806e8a690/574x300.png)

> itgenttn290
> Hai fornito un parametro con nome ‘COMPANY_CODE’, ma non esiste alcun parametro con quel nome in ‘VismaNet.GeneralLedgerTransactions.GeneralLedgerTransactions’.
> Possibili alternative valide: branch, ledger, fromPeriod, toPeriod, account, subaccountId, fromDate, toDate.

---

Fonte: [https://forums.invantive.eu/t/unknown-identifier-company-code/4871](https://forums.invantive.eu/t/unknown-identifier-company-code/4871)
