Manually select foreign key values

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

Manually select foreign key values

Postby udem001 » Tue Aug 12, 2008 4:02 pm

Is there any way you can select the foreign key value you would like to insert rather than the application selecting the foreign key values for you.

If not is this something that may be introduced to the application.
udem001
 
Posts: 1
Joined: Tue Aug 12, 2008 3:55 pm

Postby benhall » Tue Aug 12, 2008 5:59 pm

Hi,

Thanks for your post. Sadly, this currently is not possible, however it is something we will consider for the next main release.

If you have any other feedback please let us know.

Thanks

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

Must have feature!

Postby jnahmias » Mon Sep 14, 2009 12:21 am

+1 bump!

I would really appreciate being able to do this. I would model it similar to the SQL Statement generator, except that the table.column are locked-in by the FK, and all you can do is add a WHERE clause to restrict the population.

Please let me know if that doesn't make sense and I'll try to explain again...
jnahmias
 
Posts: 11
Joined: Wed Apr 30, 2008 6:33 pm
Location: NYC

Same problem in another thread

Postby jnahmias » Mon Sep 14, 2009 12:36 am

BTW, after doing a search I found another thread about this same issue at: http://www.red-gate.com/MessageBoard/viewtopic.php?t=6867.

I also posted about this when I first review SDG 1 on this thread: http://www.red-gate.com/MessageBoard/viewtopic.php?t=6928 as issue #1.

Right now I'm going to try to work around this by hacking the XML to use the SQL Statement generator for the column.

FYI, this is probably the main reason I did not renew my support contract when it came due. I personally consider it much more useful than SQL2008 support, but that may change in a year...
jnahmias
 
Posts: 11
Joined: Wed Apr 30, 2008 6:33 pm
Location: NYC

Postby schmiedh » Tue Dec 29, 2009 11:10 am

Has the original issue been addressed/fixed yet?
Many thanks,
H.
schmiedh
 
Posts: 2
Joined: Tue Dec 29, 2009 10:57 am
Location: UK

Yes, there is a way!

Postby almasmith » Wed Feb 03, 2010 7:23 pm

Although I don't know exactly what your situation is, some of redgate's generators are generic enough to allow you to do about anything.

For example (if the list is small) you could use the Regular Expression generator like so:
(FkIWant1|FkIWant2|FkIWant3|FkIWant4|FkIWant5|FkIWant6|FkIWant7|FkIWant8|FkIWant9|FkIWant10)

Or you could use the SQL Statement generator to connect to the DB and run a statement like so:
SELECT Fk
FROM Table
WHERE Data = 'Only the Fk''s I want'
almasmith
 
Posts: 7
Joined: Tue Jan 26, 2010 10:55 pm


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests