Result Set Omit When Empty
Sintassi
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
stmt_start((START))
stmt_start --> stmt_0_0[RESULT_SET_OMIT_WHEN_EMPTY]:::quoted
stmt_0_0 --> stmt_end((END))
Il suggerimento result_set_omit_when_empty estende i metadati del result set con un suggerimento per software di elaborazione come Invantive Data Access Point, indicando che il result set viene escluso dall'output quando non ha righe. Senza l'hint viene restituito un result set vuoto con solo le intestazioni di colonna, come un foglio di lavoro con una riga di intestazione e nessun dato.
Il suggerimento si combina con Result Set Name e Result Set Serialization. Se il result set viene escluso è deciso in base alle sue righe, una volta lette.
Esempi
Il foglio di lavoro Rights fa parte della cartella di lavoro Excel di un Invantive Data Access Point preimpostato solo quando Exact Online ha rifiutato almeno una tabella:
select /*+ result_set_name('Rights') result_set_omit_when_empty */
rtw.notice
from ExactOnlineREST.Views.RequestTablesWithoutRights@eol rtw