137 reputation
17
bio website
location London, United Kingdom
age
visits member for 2 years, 7 months
seen Jan 30 at 16:31

My background is in theoretical/mathematical physics [MPhys/PhD], I was a Senior Computational Fluid Dynamics Analyst in the nuclear/defense industry before selling my sole and becoming a full-time commercial software developer around 2011.


Jul
8
awarded  Notable Question
Jun
2
awarded  Popular Question
Mar
1
awarded  Popular Question
Jan
11
comment How to Find the Foreign Key Associated with a Given Primary Key
The simple answer is that I want both and the accepted answer gives me means to do this...
Jan
11
comment How to Find the Foreign Key Associated with a Given Primary Key
I need all of the constraint information for any given column (if any). I want to construct a database class that holds all the information for a given database. This class structure database.table.column.constraints will then be used to get the matches between different columns on PK/FKs. Clearly some columns will have FKs only and in this case I also want to retrieve the PK information of the corresponding key; some will have only PKs and then I want the reverse. Some of course can have both. Sorry if this also does not answer you question.
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
I am creating a script genrator for QlikView. To generate the script I need the constraints and the ascociated links.
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
Thanks for your time Aaron. Much appreciated.
Jan
10
accepted How to Find the Foreign Key Associated with a Given Primary Key
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
Thanks again. When I can bounty this I will do...
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
Thanks very much for your time here. It is most appreciated. Where can I get one of those posters!? It looks like you might be able to use INFORMATION_SCHEMA.KEY_COLUMN_USAGE? This is making me feel very weak!
Jan
10
awarded  Commentator
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
Ps. I am going to bounty this so you can have some rep!
Jan
10
comment How to Find the Foreign Key Associated with a Given Primary Key
That is absolute quality. I have been hacking around with a three teir JOIN simalar to the 1st, 2nd and 4th above. Great to see an answer like this - so difinitive! Now, two additonal things if I may be so bold. How do you find out about the poentail links between such system table and thus easyly come up with the above? or is it experience? Exending this to include the actual PK name is also not obvious to me - could you extend the answer to include this please?
Jan
10
revised How to Find the Foreign Key Associated with a Given Primary Key
added 519 characters in body
Jan
10
asked How to Find the Foreign Key Associated with a Given Primary Key
Nov
20
accepted Another BCP Export [Fail]ure
Nov
20
comment Another BCP Export [Fail]ure
I have ammended the stored proceedure as above. But I am still getting an error that is documanted here connect.microsoft.com/sqlserver/feedback/details/584001/bcp can you offer any ideas as to a resolution? Thanks again.
Nov
20
awarded  Editor
Nov
20
revised Another BCP Export [Fail]ure
deleted 52 characters in body
Nov
20
comment Another BCP Export [Fail]ure
+1, I had taken this out of context in my own mind! Thanks, but how the hell do I get a self contain SP that will allow me to build the correctly order field list if not with TmpTables? Man, this stuff drives me round the bend... Again, thanks for your time.