Indexed or Seq?
Darren Reely
darren.reely at latticesemi.com
Thu Aug 11 20:39:01 CDT 2005
Fernando,
I have used all three methods Conrad mentioned. Stored procedures for
passing and returning variables, but not row sets. Views look just like
any table. I use cursors in special one-shot items or in one case where
a problem (dynamically floating user preferred data to top of a cluster)
couldn't be solved any other way in Powerhouse.
You need to be aware that Powerhouse will not let you use Oracle
specific functions such as DECODE(), TO_CHAR(), etc, in cursors . Even
with this BIG annoyance, cursors can still give you advantages.
Here is your ACCESS statement converted to use a cursor. If I wrote it
properly, you should be able to paste it into a Quiz session.
sql in hisdb &
declare my_invoices &
cursor for &
;; NOTE: Selecting ALL (*) may impact performance.
select im.* ,id.* &
from invoice_master im &
,invoice_detail id &
where im.order_no = id.order_no
access my_invoices
choose order_no parm prompt "enter order number: "
report order_no of my_invoices product_code of my_invoices
Good luck with your optimizations.
Darren
Whittall, Conrad wrote:
> Fernando,
>
> I believe the answer to your questions is Yes and Yes...with PowerHouse
> 8 you can do either -- embed a declared cursor in your PH code, or
> create a view or stored procedure in the database and have PH access
> that. You can find all the details in the PowerHouse Series 8 Books,
> available online from the PowerHouse site...
>
> -----Original Message-----
> *From:* Fernando Olmos
> *Sent:* Friday, August 12, 2005 8:24 AM
> *To:* powerh-l at lists.sowder.com
> *Subject:* RE: Indexed or Seq?
>
> Bob and Joe,
>
> Thank you both for the input. I fully understand what's going on.
> Just one more question... Bob, are you saying to declare the cursor
> using SQL or is there a way to do this in QUIZ and have it embedded
> into the BUILD of the QUIZ program? OR can the cursor be declared at
> the database level and accessed via QUIZ? A view? Sorry, but I am
> not that familiar with Oracle. I know in Oracle RDB, from the VAX,
> we were able to "stream-line" queries with cursors, but only using
> embedded SQL within COBOL. I have never seen cursors been used from
> within Powerhouse.
>
> Cheers
More information about the powerh-l
mailing list