This question has been flagged
1 Reply
3714 Views

Friends,

I created a sequence with prefix TM..

I created some files and it generates the following sequences,

   TM001

   TM002

   TM003

Then i delete them all..

So now i want to create files with seq TM001

So i go to settings>Technical>Sequences&Identifiers>Sequences

       Next Number : 1

But when i save it till remain as 4(Not Updated)

Can u help me

Thanks

Avatar
Discard
Best Answer

You need to reset the counter in postgres for this.

ALTER SEQUENCE $yoursequence RESTART

should do the trick.

Avatar
Discard
Author

ddnt get..can u plz xplain some more

Author

Is it q query?After this can i edit it through Settings?

It's a query. Run it on your db.

Author

what i put in the place of $..I put my sequence name ..but it cause the following error,,ERROR: syntax error at or near "$"

Your sequence should be there, something like ir_sequence_0035 or so. You will have to figure out which one it is for yourself.

Author

I tried this,ALTER SEQUENCE ir_sequence_TM:0001 RESTART ..but the same error

Perhaps it would be best for you to first read the postgres documentation to see what went wrong.