Is there any way to disable the unique index of a Temp Table - LIKE Defined

Hi,

I would like to know is there any way to disable the unique index in a Temp Table?
I have table with lot of fields, I defined a temp table LIKE above database table.
My issue is, I want to overide the unique index validation from the DB while populating the temp-this temp-table.

Is it possible?

Kindly advise.

TIA
Philip P Oommen
 

vinod_home

Member
Syntax


DEFINE [ [ NEW [ GLOBAL ] ] SHARED ] TEMP-TABLE temp-table-name
[ NO-UNDO ]
[ LIKE table-name
[ VALIDATE ]
[ USE-INDEX index-name [ AS PRIMARY ] ] ...
]
[ BEFORE-TABLE before-table-name ]
[ RCODE-INFORMATION ]
[ FIELD field-name
{ AS data-type | LIKE field [ VALIDATE ] }
[ field-options ]
] ...
[ INDEX index-name
[ IS [ UNIQUE ] [ PRIMARY ] [ WORD-INDEX ] ]
{ index-field [ ASCENDING | DESCENDING ] } ...
] ...

If you use the USE-INDEX option, only the definitions of indexes you specify with that option are copied to the temporary table.
 

mrobles

Member
In addition.

In this example
1.- Define the temp-table
2.- Define an index and due I don't say UNIQUE, then it allows duplicated rows.
3.- Enter records
4.- See records

DEF TEMP-TABLE xx LIKE customer
INDEX llave
cust-num
REPEAT:
CREATE xx.
UPDATE xx.
END.

FOR EACH xx.
DISPLAY xx.
END.


If you run this, you can enter duplicated rows

MRobles
 
Top