How to find a list of columns in UniVerse with RetrieVe or SQL?

I have a problem when table(file) is configured to return a column fooin LIST tableand SELECT * FROM table. I need to know other possible columns in table. I am sure that this was achieved by setting @(defining unqualified behavior LIST) and @select(defining behavior * using very SELECT), but I do not know how to get a complete list of columns. How to read table schema in uvshand query for columns of physical table?

Running LIST.ITEMin the table shows me a list of all field numbers and values, but how do I find the DISPLAY NAMEcolumn name of the numbered fields?

+2
source share
4 answers

The previous answer I received in SO mentioned LIST DICTas a way to get some metadata. This is actually what I think. Used in official documentation LIST DICT; however, in my system, I thought there wasn’t LIST DICT, is. This requires a file argument. It simply was not a separate team (many teams have spaces in them), and in (UniVerse 10.1) the list is defined as:

LIST [ DICT | USING [ DICT ] dictname ] filename [ records | FROM n ]
[ selection ] [ output.limiter ] [ sort ] [ output ] [ report.qualifiers ] [TOXML
[ELEMENTS] [WITHDTD] [XMLMAPPING mapping_file]]

So, in general, the same verb ( LIST) for querying data is used to query the schema with the same target file.

, , LIST DICT, VOC RetrieVe LIST VOC WITH NAME MATCHING LIST..., LIST.DICT, , DICTIONARIES . , , , 400 . LIST.DICT , , LIST.DICT, LIST. , UniVerse: LIST.DICT - , , LIST - , .

, :

, LIST DICT ?

positional F# .

LIST DICT <file> <columns>

, ,

LIST DICT <file> NAME

, LIST DICT DICT.DICT.

( ) , , .

+2

:

LIST DICT foo NAME

SELECT @ID, NAME FROM DICT foo;

, LIST-ITEM:

SORT DICT foo WITH TYPE EQ "D" BY LOC LOC NAME

SORT DICT foo WITH TYPE EQ "D" BY LOC LOC NAME TOXML

, " " @ID . TOXML , XML.

+2

Universe . , . 3 , :

  • "DICT" .
  • LIST ( ) .
  • , DICT.DICT, , 2 .

, . Universe , , DICT , , DICT . , DICT.

- , . , DICT-.

The only way to come up with a simple list of dictionary entries matching the data file is by checking. Use the LIST DICT {file_name} command and find records with minimal data processing in their formatting fields.

+1
source

Some helpful hints that may help you:

SORT DICT file identifier (this is the same as a list, except that the result is sorted)

SORT ONLY DICT file name (this displays only the dictionary name)

0
source

Source: https://habr.com/ru/post/1728527/


All Articles