gpt4 book ai didi

u2 - UniVerse RetrieVe 如何查询文件中所有列的值?

转载 作者:行者123 更新时间:2023-12-01 11:09:07 28 4
gpt4 key购买 nike

有点跟进 my self-answered question about finding the column names.

在 UniVerse 中,您无法查询文件的所有列,除非文件字典中的 @ 短语设置为所有表列。如果不是,您如何查询表中所有列的值?

所以我可以使用以下方法获取总列列表(列名和显示名称):

LIST DICT file NAME

这将返回所有列及其显示名称的列表。然后如何查询表中的所有列?

LIST file

只会查询 LIST file @id(@id 是 @ 中唯一的东西)。

更新我找到了 a blog -- a living breathing person who id using a version of UniVerse older than mine!!他提示同样的事情,但说没有任何解决方案可以避免用所有列更新 @,请上帝证明他 (Dan Watts) 错了。

What if you have a 200 column table and you want SELECT * to return all 200 columns? Sorry, but you’ll have to enter all 200 column names in that "@" record. And if you add, delete or rename a column, you’ll have to remember to edit that "@" record. I feel your pain! This cumbersome approach dates back to UniVerse’s ODBC driver, and I suppose they can’t change it now without breaking a lot of applications. You can find the details described in inscrutable IBM-ese in the UniVerse ODBC Guide.

最佳答案

LIST ALL 不适用于 Universe。

您可以做的一件事是 LIST.ITEM 或 LIST-ITEM,具体取决于您的口味。这将列出文件中包含数据的每个属性,如下所示:

>LIST.ITEM ACTIVITY
LIST.ITEM ACTIVITY 06:52:10pm 14 Jan 2010 PAGE 1

1
001 LEXMARK MULTI PRINT
002 THD
003 PJ
007 10355
009 Y
010 CAGNEW
011 15349
012 52111
014 1ý2ý3ý4ý5
015 Deinstall Make/ModelýDeinstall LocationýSigned Off ByýData/Voice AvailableýR
elocated Location
016 1ý2ý3ý4ý5

2
001 OMN
002 OMN
003 PJ
004 OMN*8437
005 6
009 N
010 CAGNEW
011 15349
012 51958

>

如果你想对数据做些什么,那么写一个程序,做这样的事情:

OPEN "ACTIVITY" TO F.ACTIVITY ELSE STOP
SELECT F.ACTIVITY
LOOP
READNEXT ID ELSE EXIT
READ R.ACTIVITY FROM F.ACTIVITY, ID THEN
..................
END
REPEAT

关于u2 - UniVerse RetrieVe 如何查询文件中所有列的值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2068026/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com