How can we help you today? How can we help you today?

Foreign keys only by specific attribute

Hello I want generate in the table foreign keys but  in original table this rows have column activate (true/false) and I want foreign key from this table only with activate=true
Is it any way how do this ?
The data from original table are generated too.

Tom1555
0

Comments

2 comments

  • Jessica R
    Hi @Tom1555 ,

    Thanks for you post!

    Just to make sure I'm understanding correctly what you're hoping to do - can you please provide more detail, perhaps the schema of your table as well as an example of what the data should look like?
    Jessica R
    0
  • davehorton
    I needed this too, and did it by using the generic SQL Statement generator. That has the disadvantage of needing an explicit connection, I do not know why it does not default to "current DB" but there it is... 
    For example, I use this query: SELECT ID FROM DBO.FK_TABLE WHERE ACTIVATE = TRUE

    The problem I ran into was having to manually hack the config file when I wanted to populate different DB on a different server... but hopefully this does what you need...

    Good Luck!
    davehorton
    0

Add comment

Please sign in to leave a comment.