MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2014

Re: how to make a key on a view?



fixed

On 1/30/2014 11:40 PM, CRPence wrote:
On 30-Jan-2014 15:36 -0800, Hoteltravelfundotcom wrote:
On 30-Jan-2014 14:58 -0800, Hoteltravelfundotcom wrote:
the source for the DTAWHS is this:
CREATE TABLE PROJ_MKWN1/DTAWHS (
<<SNIP>>
INVOICE# CHAR (8 ),
<<SNIP>>

I wanted to index the invoice number <<SNIP>> This new table has the
invoice amount data which they wish to add to the report.


So... Ignoring the subject, what seems to be desired, is satisfied by
the following SQL statement that will create an INDEX to provide a keyed
Access Path over the data in the Invoice Number column.?:

CREATE INDEX PROJ_MKWN1/DTAWHSINV# ON PROJ_MKWN1/DTAWHS (INVOICE#)

...and after you create the index, the query tool (Crystal Reports?)
will refer to the base table, DTAWHS, not to the index. The index is
for the use of the optimiser.
--buck





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact