如何使用RetrieVe或SQL在UniVerse中找到列列表? [英] How do I find the column listing in UniVerse with RetrieVe or SQL?
问题描述
我遇到一个问题,其中设置了table
(文件)以返回LIST table
和SELECT * FROM table
上的列foo
.我需要知道table
中的其他可能的列.我很确定这是通过设置@
(不合格的LIST
的行为定义)和@select
(*的SELECT
行为定义)实现的,但是我不知道如何获取完整列表列.如何读取uvsh
中的表架构并查询物理表列?
I've got an issue where a table
(file) is set up to return column foo
on LIST table
and SELECT * FROM table
. I need to know the other possible columns in table
. I'm pretty sure this was achieved by setting @
(behavoir definition of unqualified LIST
), and @select
(behavoir definition of * with very SELECT
) but I don't know how to get the full list of columns. How do I read the table schema in uvsh
and query for the physical table columns?
在表上运行LIST.ITEM
会显示所有字段编号和值的列表,但是我如何找到已编号字段的DISPLAY NAME
和列名称?
Running LIST.ITEM
on the table shows me a list of all of the field numbers and values, but how do i find the DISPLAY NAME
and column name of the numbered fields?
推荐答案
我在SO上收到的先前答案提到LIST DICT
作为获取一些元数据的一种方式.事实上,这就是我想要的.官方文档使用LIST DICT
;但是,在我的系统上,我认为没有LIST DICT
了.它需要一个文件参数.根本不是一个单独的命令(许多命令中都包含空格),而是在(UniVerse 10.1)中将列表定义为:
A previous answer I received on SO had mentioned LIST DICT
as a way to get some metadata. This was in fact what I think I wanted. The official documentation uses LIST DICT
; however, on my system I thought there wasn't LIST DICT
, there is. It requires a file argument. It simply wasn't a separate command either (many commands have spaces in them), instead in (UniVerse 10.1) 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]]
因此,总而言之,用于查询数据的相同动词(LIST
)用于查询具有相同目标文件的架构.
So in summary, The same verb (LIST
) to query data is used to query the schema, with the same destination file.
最初,当我认为没有LIST DICT
时,我便使用LIST VOC WITH NAME MATCHING LIST...
用RetrieVe搜索了VOC文件,我能够识别出一个名称相同的LIST.DICT
,一个显示内容的唱片字典类型按记录类型排序.这完全符合我的要求,除了结果是一个难以管理的400行列表.我在任何地方都没有看到LIST.DICT
的文档,并且似乎记录限定符和报告限定符不能像在LIST.DICT
上那样工作LIST
.用UniVerse的话来说,这都是真的,这使我的困惑更加复杂:LIST.DICT
是一个短语,一个存储的语句,LIST
是我需要的动词.
Originally when I presumed there wasn't a LIST DICT
I went searching through the VOC file with RetrieVe using LIST VOC WITH NAME MATCHING LIST...
I was able to identify a like-named LIST.DICT
, a PAragraph that displays the contents of DICTIONARIES sorted by record type. This did exactly what I wanted except the result was a unmanageable list of 400 rows. I don't see the documentation for LIST.DICT
anywhere, and it seems as if record qualifiers and report qualifiers don't work on the LIST.DICT
like they do on LIST
. This was all true and compounded my confusion, in UniVerse parlance: LIST.DICT
is a phrase, a stored statement, LIST
is the verb I needed.
现在回到我的问题:
关于如何使LIST DICT
的输出易于管理的任何想法?
Any idea on how to make the output of LIST DICT
manageable?
您可以使用报告限定符并通过使用位置F#
语法或声明列名来显式声明列.
You can use the report qualifier and explicitly state columns by using the positional F#
syntax, or by stating the names of the columns.
LIST DICT <file> <columns>
在我的系统上,您可以通过发出
on my system you can get a listing of the field names and their display names for instance by issuing
LIST DICT <file> NAME
该名称来自主词典,可以使用LIST DICT DICT.DICT
进行查询.
The NAME comes from the master dictionary, which can be queried using LIST DICT DICT.DICT
.
现在,我可以在一个不错的列表(非常干净)中看到这些字段,但是我丝毫不了解如何查询文件的所有字段.
Now, I can see the fields in a nice (fairly clean) list, but I haven't the slightest idea of how to query a file for all of its fields.
这篇关于如何使用RetrieVe或SQL在UniVerse中找到列列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!