|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SharePoint related:
In SQL I am updating a current WebID for a webpart to a New WebId for a new webpart. I can get all the records to appear into the new web part once I do teh update. The problem is, if someone trys to add a new records or update a records. It give the error, that the next increment number is invalid. how do I force the webpart to being incrementing at the last ID say (2,0050 next record would be (2,006) instead of error on ID 2. |
|
#2
|
|||
|
|||
|
Is WebID an identity column?
|
|
#3
|
|||
|
|||
|
Yeah it is. It is the WebPart key to all the records associated with that particulare web part.
|
|
#4
|
|||
|
|||
|
And are you trying to insert by passing a value to this column?
|
|
#5
|
|||
|
|||
|
Quote:
Yeah, I am , but I do not want to have to add the thousands of values for the inserts. How to do this within the query anylayzer or sql query method. |
|
#6
|
|||
|
|||
|
if you want to insert an explicit value for an identity column do this before insert
set identity_insert yourtable on insert into table select values.... set identity_insert off |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > SQL Server 2000 - SQL incermenting records correctly |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|