Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4314 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You need to reset the counter in postgres for this.

ALTER SEQUENCE $yoursequence RESTART

should do the trick.

อวตาร
ละทิ้ง
ผู้เขียน

ddnt get..can u plz xplain some more

ผู้เขียน

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

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

ผู้เขียน

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.

ผู้เขียน

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.