Doing Column Updation while using SQL BulkCopy

  • I am using SQLBulk copy operation from .NET C#.

    Tables has a column named as ID. Its data type is int.

    I want something like a trigger or exactly a trigger which inserts the same ID value for every bulk copied record.

    This ID value should be maximum id value existing in the table +1.

    Is there any way to do this.

    I dont want my application to hit the table first before bulk copy and get the maximum id available and then pass that id+1 while doing bulk copy.

  • You need to read about using IDENTITY column in SQLServer...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply