×
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.
Thanks for this Brian,
I can't pur the identity column in the reference file as it is a DDS file. I
tried creating the table as a result from 2 tables,
eg create table T as ( select id from SQLtable, name from DDSfile)
But the column id loses its identity.
In the end I added the Identity column manually.
Just one problem : this page :
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.
db2.udb.doc/admin/c0004994.htm it says I can't do that, but it seems I have
already. What have I missed?
Now, I have discovered sequences. Using a sequence instead of an identity
lets me forget the identity column that I can't put in the DDS reference
file.
From: "Brian Johnson" <brian.johnson.mn@xxxxxxxxx>
Column defined in "field reference table":
create table ref-table-name ...
primary_key_oid for pk_oid integer not null generated always
as identity
(cycle) ...
Column defined in a table using the reference table:
create table table-name
( priKey , ... )
as ( select primary_key_oid , ...
from ref-table-name )
definition only
including identity column attributes
including column defaults
As an Amazon Associate we earn from qualifying purchases.
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.