Manually select foreign key values

udem001udem001 Posts: 2
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.

Comments

  • 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
  • +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...
  • 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...
  • Has the original issue been addressed/fixed yet?
    Many thanks,
    H.
  • 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'
Sign In or Register to comment.