VIEWS in sperform
Posted in 1995
Hi,
Can anyone out there pl. put opinions on using views in sperform.
Scenario goes like this.
1. I have 2 tables
invoice Invoice Master ( Key = invoice_no )
consignee Consignee Details ( Key = invoice_no )
Schema For Table : invoice
invoice_no char(12),
invoice_amt decimal(11, 2),
invoice_date date,
consignor_name char(45),
address_line_1 char(30),
address_line_2 char(30)
Schema For Table : consignee
invoice_no char(12),
consignee_name char(45),
address_line_1 char(30),
address_line_2 char(30)
2. View has been Created based on above 2 tables
CREATE VIEW vw_invoice AS
SELECT invoice.*, consignee_name
FROM invoice, consignee
WHERE invoice.invoice_no = consignee.invoice_no
3. I have 2 Forms created
3a. One based on VIEW ( vw_invoice )
3b. Second based on Tables : invoice, consignee
4. Querying on any invoice from isql, No problems.
SELECT * FROM vw_invoice WHERE invoice_no = "<Any Invoice>"
5. Querying on Form 3b. , No Problems
3b. Form Definitions
DATABASE findb
SCREEN SIZE 24 by 80
{
Invoice : [f001 ] Invoice Amount : [f002 ]
Consignee : [f003 ]
}
END
TABLES
invoice
consignee
ATTRIBUTES
f001 = invoice.invoice_no = consignee.invoice_no;
f002 = invoice.invoice_amt;
f003 = consignee.consignee_name;
END
6. 3a. Form is Created based on vw_invoice
DATABASE findb
SCREEN SIZE 24 by 80
{
Invoice : [f001 ] Invoice Amount : [f002 ]
Consignee : [f003 ]
}
END
TABLES
vw_invoice
ATTRIBUTES
f001 = vw_invoice.invoice_no;
f002 = vw_invoice.invoice_amt;
f003 = vw_invoice.consignee_name;
END
Any Invoice Query based on form 3a invites Error Messages
Error Messages
6a. Cannot use ROWID for views with aggregates, group by or an
multiple tables
6b. Cursor or Statement is not Available.
Is it correct to say VIEWS based on Multiple Tables cannot be used in
sperform or am i missing something in Form 3a.
Any Suggestions / Comments will be appreciated.
Thanks in advance
HP-UX 9000/837 A.09.04
INFORMIX ON-LINE 5.03.UC5X1
INFORMIX SQL 4.11.UC1
--
Rgds,
__________________________________________________________________________
Chetan Anand DHL INTERNATIONAL (Singapore) Pte Ltd
Systems Analyst Singapore
Internet : anand@sin-co.sin-ro.dhl.com
Tel : 65+ 3805-804
__________________________________________________________________________