Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Index question

Status
Not open for further replies.

jjgraf

Programmer
Joined
Aug 19, 2001
Messages
237
Location
US
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]


 
skip this i had a brain fart teaches you not to program on 17 hours straight
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top