I said "can be used to create restrains" below, but what I meant to 
say was "can be used to create constraints"  LOL

Regards,

LelandJ


On 08/26/2010 08:44 PM, Leland Jackson wrote:
>    PostgreSQL and Oracle use a "sequence" to create an auto incrementing,
> unique primary key.  Each table should have a unique primary key that
> can be used to create restrains for enforcing referential integrity.
> Evidentially, the closest thing MSSQL has to a sequence is an IDENTITY:
>
> http://bytes.com/topic/sql-server/answers/80436-sequence
>
> Regards,
>
> LelandJ
>
>
>
> On 08/26/2010 04:11 PM, Vincent Teachout wrote:
>> I'm fairly good with SQL, but I really don't know a lot about MSSQL.
>>
>> I have a new field: UID, char(10).  I'd like to fill it with a 10
>> character incrementing "number"  i.e.,
>> "0000000000"
>> "0000000001"
>> "0000000002"
>> .... etc, up to the number of records currently in the file.
>>
>> I could write a vfp program to create a view, and increment each number
>> with PadL(transform(recno()),10,"0"), but I'd like to simply send an SQL
>> script to users who already have this file on MSSQL.
>>
>> Is there a simple way to do this in MSSQL, or is there an equivalent to
>> recno() in MSSQL?  Thanks.
>>
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to