MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2012

RE: reset auto increment field.



fixed

Mike,

In your ALTER Column statement you used RESET WITH 1. Try RESTART = 1.

Regards,
Pat Landrum



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Smith, Mike
Sent: Wednesday, October 31, 2012 4:17 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: reset auto increment field.

Hi Kurt,
I am moving the data from test to production.
I tried creating a backup and recreating my file and copying back to it,
but that didn't work.

I did get it to work by removing the identity column and re adding it,
but I think that only worked because it was really just 1 file and
nothing else touching it.

Mike

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Anderson, Kurt
Sent: Wednesday, October 31, 2012 3:42 PM
To: Midrange Systems Technical Discussion
Subject: RE: reset auto increment field.

Why don't you create a new file in production? Do you need to move data
to production as well? If so, I'm also new to Identity columns (just
put in two files with them for the first time). Can you copy the old
file to the new and it knows to not copy the identity columns and
instead starts setting the identity based at your starting number as
defined in the table?

-Kurt

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Smith, Mike
Sent: Tuesday, October 30, 2012 9:05 AM
To: Midrange Systems Technical Discussion (midrange-l@xxxxxxxxxxxx)
Subject: reset auto increment field.

I have a file that I have an auto increment field in. Currently the
file is in development and I would like to clean up the auto incremented
field before it goes to production.

I know its not absolutely necessary, but I'd like to anyway.

I have tried the following "alter table mytable alter column tiid reset
with 1"

I get a message that the alter completed, but I don't see any difference
in the tiid column.

What am I doing wrong with this statement?
Is this there another way to do this?
I'm on V6R1.

Thanks

Mike

NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.
--
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.

NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this
message in error, or are not the named recipient(s), please immediately
notify the sender and delete this message.





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