Red Gate forums :: View topic - Manually select foreign key values
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 1
SQL Data Generator 1 forum

Manually select foreign key values

Search in SQL Data Generator 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
udem001



Joined: 12 Aug 2008
Posts: 1

PostPosted: Tue Aug 12, 2008 4:02 pm    Post subject: Manually select foreign key values Reply with quote

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.
Back to top
View user's profile Send private message
benhall



Joined: 14 Dec 2007
Posts: 98

PostPosted: Tue Aug 12, 2008 5:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jnahmias



Joined: 30 Apr 2008
Posts: 11
Location: NYC

PostPosted: Mon Sep 14, 2009 12:21 am    Post subject: Must have feature! Reply with quote

+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...
Back to top
View user's profile Send private message
jnahmias



Joined: 30 Apr 2008
Posts: 11
Location: NYC

PostPosted: Mon Sep 14, 2009 12:36 am    Post subject: Same problem in another thread Reply with quote

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...
Back to top
View user's profile Send private message
schmiedh



Joined: 29 Dec 2009
Posts: 2
Location: UK

PostPosted: Tue Dec 29, 2009 11:10 am    Post subject: Reply with quote

Has the original issue been addressed/fixed yet?
Many thanks,
_________________
H.
Back to top
View user's profile Send private message
almasmith



Joined: 26 Jan 2010
Posts: 7

PostPosted: Wed Feb 03, 2010 7:23 pm    Post subject: Yes, there is a way! Reply with quote

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'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group