Hi, I want to create a trigger to increment value of my VisibleNo field if it gets duplicate value. My Application is my multiple users at same time . When at first suppose two users open application it gets same visible no and it saves duplicate number. I want use trigger to before inserting values . i have generated my visibleno from coding its of the form 'DO0001' please help me how to write the trigger for before insert

Why not use an IDENTITY column? You can prefix the DO and zeros in a view or query.

My DOID is is identity and i am generating DOvisible number from C# coding

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.