[DM2] Clearing SQL Records

smoochy boys on tour

Jicaa

Pooslice
Golden Oldie
Jul 9, 2003
2,386
36
204
How can i clear one of the tables data, whenever i try to do so its comes up with "Key column information is insufficiant or incorrect. Too many rows were affected by the update."

I was trying to delete the data inside TBL_MONGEN if your wanted to know.
 

Dookie

LOMCN Veteran
Veteran
Aug 5, 2004
294
1
65
You have to use a SQL Statement if you get that error. If you try and do anything to the row in the normal window it will throw up that error. Delete the row using the following SQL statement and then add it again and it should be ok.

Code:
BEGIN TRAN

DELETE
FROM TBL_MONGEN
WHERE FLD_MAPFILENAME = '<Mapname>' 
AND FLD_X = '<X Coord>' 
AND FLD_Y = '<Y Coord> ' 
AND FLD_MONNAME = '<Monster Name> '

SELECT * FROM TBL_MAPINFO

ROLLBACK TRAN

COMMIT TRAN

I added in the tran just incase you enter the wrong details, check the details after you update and if there right commit if there wrong rollback. If you want you can take out the X and Y lines, i just put those in so the row was more likly to be unique. Just comment them out using -- if you don't need/want them.

Hope that helps

-Dookie
 
Last edited:
Upvote 0