openedge

How to convert A00073 value to 9973 in progress 4gl

十年热恋 提交于 2019-12-04 05:41:50
问题 i have column having multiple value like A0045 ,A00065 . i want to convert it 9945, 9965. Need to remove all 0 and character value and add 99 before that value.. Please help.. 回答1: This can be done in many ways. Here is one way (may not be the best). As I don't have a database, I created a temp table. def temp-table tt field val as char. create tt. tt.val = "A0045". create tt. tt.val = "A00065". for each tt: run filter_zero(input-output val). val = replace(val,"A","99"). DISP val. end.

unixodbc driver manager cannot open specified library on install

那年仲夏 提交于 2019-12-03 13:00:39
I'm using ArchLinux and I am trying to install OpenEdge progress drivers so I can access it via PHP. I've installed the unixodbc package and the drivers, but when I test the connection via isql or PHP, I get the same error... # isql -3 SUBS2A [01000][unixODBC][Driver Manager]Can't open lib '/usr/dlc/odbc/lib/pgoe1023.so' : file not found [ISQL]ERROR: Could not SQLConnect The messed up thing is that "/usr/dlc/odbc/lib/pgoe1023.so" presently exists, I even symlinked it from "/usr/dlc". The following are my .ini files... odbc.ini [SUBS2A] Description = ODBC Driver for Progress Driver = /usr/dlc

How to 'group by' using variables in 4gl

≯℡__Kan透↙ 提交于 2019-12-02 19:07:46
问题 Is there a way to group records by a field within a table within a 4gl query? My code. define variable v-invoice as inte no-undo. define variable v-sell-price as decimal no-undo. define variable v-cost-price as decimal no-undo. define variable iinv as integer no-undo. For each Order no-lock : v-invoice = Order.tblinvoice. v-sell-price = Order.sell-price. v-cost-price = Order.cost-price. iinv = iinv + Order.sell-price. display Order.invoice Order.sell-price. end. Thank you 回答1: Yes, of course

How to 'group by' using variables in 4gl

╄→尐↘猪︶ㄣ 提交于 2019-12-02 12:03:41
Is there a way to group records by a field within a table within a 4gl query? My code. define variable v-invoice as inte no-undo. define variable v-sell-price as decimal no-undo. define variable v-cost-price as decimal no-undo. define variable iinv as integer no-undo. For each Order no-lock : v-invoice = Order.tblinvoice. v-sell-price = Order.sell-price. v-cost-price = Order.cost-price. iinv = iinv + Order.sell-price. display Order.invoice Order.sell-price. end. Thank you Yes, of course you can, very basic: DEFINE VARIABLE v-sell-price AS INTEGER NO-UNDO. DEFINE VARIABLE v-cost-price AS

How to mimic SELECT … LIMIT, OFFSET in OpenEdge SQL?

爷,独闯天下 提交于 2019-12-01 23:21:14
It's a common thing in most SQL implementations to be able to select a "sliding window" subset of all the rows returned in a query. A common use case for this is pagination. For example, say I have a search page with 10 results on each page. For implementations that support LIMIT and OFFSET keywords, the query used to return results for each page would be as follows: page one would use SELECT ... LIMIT 10 OFFSET 0 , page 2 would use SELECT ... LIMIT 10 OFFSET 10 , page 3 would use SELECT ... LIMIT 10 OFFSET 20 , etc. (note that the OFFSET takes effect before the LIMIT ). Anyway, I'm trying to

How to mimic SELECT … LIMIT, OFFSET in OpenEdge SQL?

落花浮王杯 提交于 2019-12-01 22:40:29
问题 It's a common thing in most SQL implementations to be able to select a "sliding window" subset of all the rows returned in a query. A common use case for this is pagination. For example, say I have a search page with 10 results on each page. For implementations that support LIMIT and OFFSET keywords, the query used to return results for each page would be as follows: page one would use SELECT ... LIMIT 10 OFFSET 0 , page 2 would use SELECT ... LIMIT 10 OFFSET 10 , page 3 would use SELECT ...

Getting first 100 records from the table in Progress OpenEdge database (e.g. SELECT TOP 100..)

[亡魂溺海] 提交于 2019-11-29 14:07:14
How can I get a limited number of records from the table in Progress OpenEdge database? Something like in SQL: SELECT TOP 100 * FROM MyTable The only ugly solution I can find is looping through all records and breaking when 100 of them were displayed. But feels like there should be some better way of doing it. If you are using the 4GL you might also want to look at using OPEN QUERY and MAX-ROWS to achieve the result that you are looking for. The following shows a traditional FOR EACH loop with a counter and then a QUERY with MAX-ROWS: define variable i as integer no-undo. define frame a with

Getting first 100 records from the table in Progress OpenEdge database (e.g. SELECT TOP 100..)

China☆狼群 提交于 2019-11-28 07:44:42
问题 How can I get a limited number of records from the table in Progress OpenEdge database? Something like in SQL: SELECT TOP 100 * FROM MyTable The only ugly solution I can find is looping through all records and breaking when 100 of them were displayed. But feels like there should be some better way of doing it. 回答1: If you are using the 4GL you might also want to look at using OPEN QUERY and MAX-ROWS to achieve the result that you are looking for. The following shows a traditional FOR EACH