
Returning variables to PRO4 from PLSQL?
Started by
Guest_kwong_*
, Apr 13 2004 12:05 PM
23 replies to this topic
#18
Posted 16 April 2004 - 04:54 PM
Guest,
I'm not sure what you mean by this. We have one source library that supports clients on very divergent platforms:
OS's: Unix, Windows
Databases: ProISAM, Oracle, SQL Server, PostgreSQL
ProIV versions: 4.6, 5.5
Some parts of the system require additional coding: reports, dynamic SQL generation, etc.
However, I have to give high marks to ProIV for portability.
Regards,
Joseph
Anyone else remember the days when PRO-IV was a portable language?
I'm not sure what you mean by this. We have one source library that supports clients on very divergent platforms:
OS's: Unix, Windows
Databases: ProISAM, Oracle, SQL Server, PostgreSQL
ProIV versions: 4.6, 5.5
Some parts of the system require additional coding: reports, dynamic SQL generation, etc.
However, I have to give high marks to ProIV for portability.
Regards,
Joseph
#19
Guest_kwong_*
Posted 21 April 2004 - 09:47 AM
I have tried using this ...
SQL
BEGIN
SELECT SUM(A) INTO :##VAR(#K) FROM TABLE
END;
ENDSQL
Its give me problem.... if I dont use ARRAY in pro4, its work well... Any suggestion if I wanna use the array variable in PRO4???
Other wise I have to re-write this statement 10 times... because i need to loop the record in table 10 times.
Thanks!!
SQL
BEGIN
SELECT SUM(A) INTO :##VAR(#K) FROM TABLE
END;
ENDSQL
Its give me problem.... if I dont use ARRAY in pro4, its work well... Any suggestion if I wanna use the array variable in PRO4???
Other wise I have to re-write this statement 10 times... because i need to loop the record in table 10 times.
Thanks!!
#20
Posted 21 April 2004 - 10:32 AM
jm2c, you should write this as P4 cycle for ease
of maintenance. Then you can put the result into
the array in AR-NE.
But why can't it be like the following?
IF BLAH
K = 1
$WHERE = 'BLAHBALH'
ELSE
K = 2
$WHERE = 'XYZ'
ENDIF
SQL
BEGIN
SELECT SUM(A) INTO :##TEMP FROM TABLE
END;
ENDSQL
##VAR(#K) = ##TEMP
?
of maintenance. Then you can put the result into
the array in AR-NE.
But why can't it be like the following?
IF BLAH
K = 1
$WHERE = 'BLAHBALH'
ELSE
K = 2
$WHERE = 'XYZ'
ENDIF
SQL
BEGIN
SELECT SUM(A) INTO :##TEMP FROM TABLE
END;
ENDSQL
##VAR(#K) = ##TEMP
?
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.
of the poster and do not represent those of any organisation.
#23
Posted 23 April 2004 - 03:18 AM
![]()
You may want to try this code to get count , sum or total.
SQL
BEGIN
SELECT COUNT(*) INTO :#VAR
WHERE CLAUSE ;
END ;
ENDSQL
I've been unable to get this to work - thought it was maybe because I'm on 4.6.
I was putting the code in a global logic - seemed an ideal place for it. Turns out it doesn't work there.
Exactly the same code in a funtion works fine.

Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users