我得到一个"索引超出了数组的范围." 我执行以下操作时出错.
1)我启动导入和导出数据向导(32位).
2)数据源:Odbc的.Net Framework数据提供程序.
3)我为我设置的32位Progress OpenEdge 10.2A ODBC驱动程序提供了连接字符串和DSN.
4)我设置了一个平面文件目的地.
5)当我点击"下一步"时,我收到以下错误:
无法检索源和目标数据的列信息,或者源列的数据类型未正确映射到目标提供程序上可用的列数据.
"VISION"."PUB"."tlrtran" - > C:\ Documents and Settings\user\Desktop\flat-file.txt:
- Index was outside the bounds of the array.
Run Code Online (Sandbox Code Playgroud)
附加信息:
指数数组的边界之外.(Microsoft.DataTransformationServices.Controls)
我正在尝试使用查询列出实际所有者的所有公寓。
我的公寓桌子看起来像这样:
building | apartmentNbr | owner | start | end
b1 | a1 | o1 | 2009-08-13 | 2010-08-13
b1 | a1 | o2 | 2010-08-14 | 2019-01-01
b1 | a2 | o3 | 2009-01-03 | 2010-01-03
b1 | a2 | o4 | 2010-01-04 | 2010-08-13
b1 | a2 | o5 | 2010-08-14 | 9999-12-31
b1 | a3 | o6 | 2010-08-14 | 2019-12-31
b1 | a3 | o7 | 2020-02-14 | 9999-12-31
b2 | b1 | o8 | …Run Code Online (Sandbox Code Playgroud) 我正在使用 DBeaver 连接到支持 SQL 函数的 Open-Edge 11 数据库。这里使用的功能不起作用。这是一个示例和结果:
功能:
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'TxMSAGrading'
Run Code Online (Sandbox Code Playgroud)
错误:
SQL Error [42S02]: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Table/view/synonynm "INFORMATION_SCHEMA.COLUMNS" cannot be found. (15814)
Run Code Online (Sandbox Code Playgroud)
如何获取列名?
我发现在Progress 10.1中,当在查询中使用多个索引时,数据库将使用索引列表中的第一个索引,而不是最优化的索引,也不是两个索引的子集。
其他人有没有经历过?
================================================== ===============
定义了几个索引,但我们正在查看的两个索引是:XIE1cac_role_person ownering_entity_mnemonic owning_entity_key role_key
XIE2cac_role_person contract_obj person_role_code Effective_from_date
最初,我的代码如下,它使用的是第一个索引,该索引返回的数据集更大。
FOR EACH cac_role_person NO-LOCK
WHERE cac_role_person.contract_obj = cbm_contract.contract_obj
AND cac_role_person.owning_entity_mnemonic = "BROKER"
AND (
(cac_role_person.effective_to_date > TODAY
AND cac_role_person.effective_to_date >=
cbm_contract_component.contract_component_start_date)
OR (cac_role_person.effective_to_date = ?
AND cac_role_person.effective_from_date <=
cbm_contract_component.contract_component_start_date)
):
Run Code Online (Sandbox Code Playgroud)
所以我现在强迫它使用第二索引:
FOR EACH cac_role_person NO-LOCK USE-INDEX XIE2cac_role_person
WHERE cac_role_person.contract_obj = cbm_contract.contract_obj
AND cac_role_person.owning_entity_mnemonic = "BROKER"
AND (
(cac_role_person.effective_to_date > TODAY
AND cac_role_person.effective_to_date >=
cbm_contract_component.contract_component_start_date)
OR (cac_role_person.effective_to_date = ?
AND cac_role_person.effective_from_date <=
cbm_contract_component.contract_component_start_date)
):
Run Code Online (Sandbox Code Playgroud)
第一个代码在30小时内修复了约4000次,而改进后的12小时内修复了7万次。(循环是更大的部分的一部分,但这只是我需要加快处理17倍的更改
在Progress数据库的早期版本(9.X,10.X)中,以下查询可以很好地找到表的主索引。
select "_index-name"
from PUB."_index" in, PUB."_file" fi
where fi."_file-name"='tableName'
and in."rowid" =
(select"_file"."_prime-index"
from PUB."_file" fs
where fs."_file-name"='tableName');
Run Code Online (Sandbox Code Playgroud)
现在,在进度v11.6上已删除了rowid,是否有任何SQL查询通过ojdbc来获取进度数据库表的主索引?
我是进步的新手。我只是按照下面的知识库文章,但我没有得到所需的输出。 https://knowledgebase.progress.com/articles/Knowledge/How-to-write-ap-script-to-execute-via-proenv-to-produce-a-stderr-stdout-in-a-file
MESSAGE ENTRY (1, "This is a test") VIEW-AS ALERT-BOX.
MESSAGE "Hello there" VIEW-AS ALERT-BOX.
DISPLAY "hello world".
Run Code Online (Sandbox Code Playgroud)
proenv>proenv -b -p test.p > test.out
Run Code Online (Sandbox Code Playgroud)
$ cat test.out
DLC: /opt/progress/117
WRKDIR: /opt/progress/wrk_117
OEM: /opt/progress/oemgmt_117
OEMWRKDIR: /opt/progress/wrk_oemgmt_117
Inserting /opt/progress/117/bin to beginning of path and
setting the current directory to /opt/progress/wrk_117.
OpenEdge Release 11.7.5 as of Fri Jun 7 08:29:03 EDT 2019
Run Code Online (Sandbox Code Playgroud)
我没有找到,我做错了什么。感谢这方面的帮助。谢谢。
我是 4gl 的新手。我有一个查询,我必须计算特定客户的销售订单数量。
例如:我的表为 so_mstr,so_cust 是我的客户名称字段,so_nbr 是我的销售订单编号字段。
在 SQL 我试过这样,
select so_cust,count(distinct so_nbr) from so_mstr group by so_cust.
Run Code Online (Sandbox Code Playgroud)
请帮助我进行中。谢谢。
何我为可以接受三个输入参数的程序编写代码:x,y和要写入的文件名?
我应该能够像这样调用程序:运行prog.p(输入"1",输入5,输入"filename1.csv").
到目前为止,我已经编写了下面的代码,不知道如何解决它.
OUTPUT TO xxxxxx\filename1.csv".
DEFINE VARIABLE Profit AS DECIMAL FORMAT "->>,>>9.99":U INITIAL 0 NO-UNDO.
EXPORT DELIMITER "," "Amount" "Customer Number" "Invoice Date" "Invoice Number" "Total_Paid" "Profit".
FOR EACH Invoice WHERE Invoice.Ship-charge > 5.00
AND Invoice.Total-Paid > 0.01
AND Invoice.Invoice-Date GE 01/31/93 /* this is between also can use < >*/
AND Invoice.Invoice-Date LE TODAY NO-LOCK:
Profit = (Invoice.Invoice-Num / Invoice.Total-Paid) * 100.
EXPORT DELIMITER "," Amount Cust-Num Invoice-Date Invoice-Num Total-Paid Profit.
END.
OUTPUT CLOSE.
Run Code Online (Sandbox Code Playgroud)
谢谢.
progress-db ×8
openedge ×7
progress-4gl ×4
sql ×3
database ×1
dts ×1
jdbc ×1
odbc ×1
sql-server ×1
ssis ×1