Multiple columns as unique

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Multiple columns as unique

Postby dineshasanka » Wed Apr 16, 2008 1:33 pm

There is no way that you can specify multiple columns as unique. However, if you can define this unique key constraint from the database end, data generator tool will treat multiple columns in the unique key constraints and generate data accordingly. For example, if I need to set both FirstName and LastName as unique constraints there is no way of doing this,unless I create unique key constraint from the database side
dineshasanka
 
Posts: 133
Joined: Mon Jul 11, 2005 1:04 pm
Location: Colombo Sri Lanka

Postby benhall » Wed Apr 16, 2008 2:53 pm

Hi Dinesh,

Thank you, it's an interesting idea. If I understand you correctly, you want to manually specify a multi-column unique constraint via the UI?

In the database it would be something like this:
CREATE UNIQUE NONCLUSTERED INDEX [NC_Relationship11_TwoUniqueConstraints1] ON [dbo].[Relationship11_TwoUniqueConstraints] ([one], [two])

I like the suggestion, I will add it to the list and see what we can do for a future release.

Thanks

Ben
benhall
 
Posts: 69
Joined: Fri Dec 14, 2007 11:15 am

Postby dineshasanka » Thu Apr 17, 2008 6:11 am

Yes that is exactly what I meant
dineshasanka
 
Posts: 133
Joined: Mon Jul 11, 2005 1:04 pm
Location: Colombo Sri Lanka

Postby gvsoft » Mon Oct 01, 2012 11:03 pm

What happened to this requested suggestion? Did it get tossed out? Four years later, version 2.0.3.1 still doesn't have this capability.
gvsoft
 
Posts: 16
Joined: Thu Jul 19, 2012 12:11 am


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 1 guest