Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
MikeB
Constraint Violating Yak Guru
387 Posts |
Posted - 2002-08-08 : 13:03:02
|
I have a table:ProjectID | ComponentID | Stack | Level | Position |10001 | 101 | 0 | 0 | 0 |10001 | 101 | 0 | 0 | 0 |10001 | 101 | 0 | 0 | 0 |10001 | 101 | 0 | 0 | 0 |10001 | 101 | 0 | 0 | 0 | As you can see, these records are identical. This is the case becausethe stack, level and position of each record is waiting to be set.Is there a way, to delete 1 single record from this table?Mike B |
|
MikeB
Constraint Violating Yak Guru
387 Posts |
Posted - 2002-08-08 : 13:35:58
|
The only way I see how to do this, is to add an AutoNumber field to the table. Then use this number as part of the criteria in the following DELETE statment:("DELETE FROM tblLoadListWHERE ShippingDate = #%s#AND ProjectID = '%s'AND ListID = %d", csProject, csID, csNumber) I am using c++, ADO, and Access for this project. I will be using SQL server sooner or later after the systems proves itself. Does SQL have a way of doing this, or does SQL have an AutoNumber Field?Mike B |
 |
|
LarsG
Constraint Violating Yak Guru
284 Posts |
Posted - 2002-08-08 : 17:17:57
|
It is possible to set an identity attribute for a column in SQL server. This works the same as a auto_number in access. |
 |
|
|
|
|