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 |
|
ericaq_74
Starting Member
2 Posts |
Posted - 2007-08-08 : 15:39:59
|
| Hi,I am new to SQl Server, i have created a logical model for a database that i am creating for a project. Is there a way i can assign automatic values to my Primary Key (PK) Column other than using an identity?For example i have a table called indicator for which the Primary Key (PK) is indicator_identifier; i want the primary key values to beind_0001ind_0002ind_0003Please note that i may be populating the tables from a VB.NET formPlease can anybody help me? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-08 : 16:05:44
|
| http://www.sqlteam.com/article/custom-auto-generated-sequences-with-sql-server_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-08-08 : 17:11:48
|
quote: Originally posted by ericaq_74 Hi,I am new to SQl Server, i have created a logical model for a database that i am creating for a project. Is there a way i can assign automatic values to my Primary Key (PK) Column other than using an identity?For example i have a table called indicator for which the Primary Key (PK) is indicator_identifier; i want the primary key values to beind_0001ind_0002ind_0003Please note that i may be populating the tables from a VB.NET formPlease can anybody help me?
This is almost always a really bad idea. Just use an identity column to create sequential numbers.CODO ERGO SUM |
 |
|
|
|
|
|