× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I can confirm that there is no record of the actual CREATE TABLE statement
used to define a table.

One piece of information I would like to add to the discussion (which may
or may not be useful) is that for a CREATE TABLE AS (select ...), any
columns that come directly from another table will be shown in DSPFFD as a
field reference. This information might supply some clue about the source
of your table. This was added over 3 years ago as part of SF99701 Level
24 (and in the base releases for both 7.2 and 7.3). The information is
recorded for any tables created after that DB Group PTF is applied.

create table qtemp.x as (select intcol from qsys2.qsqptabl) with data

DSPFFD:

INTCOL BINARY 9 0 4 1 Both INTCOL
Referenced information
Referenced file . . . . . . . . . . . . : QSQPTABL
Library . . . . . . . . . . . . . . . : QSYS2
Referenced record format . . . . . . . : QSQPTABL
Referenced field . . . . . . . . . . . : INTCOL
Attributes changed . . . . . . . . . . : None

Sue Romano
IBM i SQL Development\


I am rereading your original post ... if the file was created using
Create table as (select....) then this information is not going to be
stored with the table.

As Luis said, all you can get is the SQL table definition.

Paul

On 2017-06-27 12:20, Dan wrote:

I know I've seen DSPFD show the SQL statement used to create a table or
view. I've got a table that I'm 99% certain was created with SQL, but
DSPFD shows no SQL statement. DSPOBJD shows no source
file/library/member
data for this table.

This table was very likely created with a CREATE TABLE x as (select
...)
WITH DATA. Is there a system view that would have this information?

Google is either not my friend or I'm searching with the wrong terms.

- Dan




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.