I know i can do this in Foxpro but how do you create an index on two columns combined to together to create a Unquie index so no duplicate records are created.
example
In my application i have a parent table and child table that has detail lines what i would like to do is take both the Foregin Key field plus the detail line which are both integers convert them to character then add the strings together to create a unique index.
this creates an error
Create Unique NonClustered Index IX_cert_line on dbo.certplot ( cast(certl as char) + cast(line)) with fillfactor =99 on [Primary]
example
In my application i have a parent table and child table that has detail lines what i would like to do is take both the Foregin Key field plus the detail line which are both integers convert them to character then add the strings together to create a unique index.
this creates an error
Create Unique NonClustered Index IX_cert_line on dbo.certplot ( cast(certl as char) + cast(line)) with fillfactor =99 on [Primary]