MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » January 2014

RE: how to make a key on a view?



fixed

Not all databases have this limitation. You can create indexes on views in other databases (oracle and MS SQL server for instance).

http://msdn.microsoft.com/en-us/library/ms191432.aspx

-----Original Message-----
From: Vernon Hamberg [mailto:vhamberg@xxxxxxxxxxxxxxx]
Sent: Thursday, January 30, 2014 12:14 PM
To: Midrange Systems Technical Discussion
Subject: Re: how to make a key on a view?

Actually it is not DB2 that has this restriction = it is the SQL standard that does not allow CREATE INDEX over a view. And I'm not sure if CREATE INDEX can be done over a PF that does not have DDS source - CRTPF with RCDLEN only.

HTF.COM - when you say 'txt', are you speaking of a text file in the IFS or of a file member of type TXT - that'd have to be a source file, I think.

You can't do anything directly with SQL views or LFs over IFS files - as Gary says, you create a DDS file - and I'll add, CREATE TABLE in SQL can do the same.

I have to say, I think the terms you are using are mixed up - so please clarify whether IFS or source files or whatever you are looking at.

Thanks
Vern

On 1/30/2014 11:49 AM, Gary Thompson wrote:
DB2 does not provide a way to "index" a view.
You could copy/convert the .txt file to a dds file that is keyed.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Hoteltravelfundotcom
Sent: Thursday, January 30, 2014 10:47 AM
To: Midrange Systems Technical Discussion
Subject: how to make a key on a view?

i HAVE A file that is 'txt' not PF. Can I make a logical DDS LF on that?
if not, how can I make an key index on a view?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.







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