Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Lookup Fields in SQL Server Management Studio

Posted on 2011-03-24
3
Medium Priority
?
688 Views
Last Modified: 2012-05-11
Is there any equivalent in SQL Server Mgmt Studio to the lookup field in MS Access?  With multiple foreign keys to different tables, it would be nice not to have to join tables each time and just be able to see the name assocated to the auto generated ID
0
Comment
Question by:atkinsHOU
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35210470
no, in Mgt Studio this is not possible.
0
 
LVL 15

Accepted Solution

by:
Aaron Shilo earned 1000 total points
ID: 35213180
SQL Server does not have the ability to set up a Lookup field like MS Access does. You will have to do this individually in your application.
You can, however, create views that will query the related table structures and show you the actual values corresponding to the keys stored in your table.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 1000 total points
ID: 35214659
What you need is to create a cross-reference table that contains all the "multiple foreign keys".  You will find this approach is far superior as it supports indexing on the columns and will therefore produce good performance on large tables.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question