Results 1 to 5 of 5

Thread: Table Design

  1. #1
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312

    Unanswered: Table Design

    In Access you can create an Autonumber field as your primary key and then a second field for description. Ex.

    ID---Desc
    1----Something
    2----Whatever
    3----Something Else


    Then in a table with the foreign key show the description instead of the ID by setting the field (at the table level) to a combo box, ex.

    ID-----------Field2-------Field3
    Something---2345--------?
    Something---3424--------!
    .
    .
    .
    Whatever----4567--------#

    Anyone know how I can replicate this in SQL Server? Is it possible?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    That's the dreaded lookup field "feature" in Access. I can't think of an equivalent in SQL Server. I wouldn't have looked for it though, as I'm one of those that hate that feature.
    Paul

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Agree with Paul. I've never use it ... Don't think it can be done in SQL Server ... It's a REAL rdms ... Keep in mind too that this "feature" is a helper on in the sense that if you make a form and directly expose a table to the user where that lookup is needed ... But who in the hell in their right mind would do something that asinine??? Not any REAL programmer ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    I am not in a typical programmer/user environment. About 80% I am the user and I tend to use the feature to speed up my table driven applications. Rather than spending alot of time creating forms to do what I want, I will do it at the table level.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi DC

    Nope - defo not available available in SQL Server. If you posted in the SQL Server forum you would be told that it is a presentation issue and not something an RDBMS would get involved with. Even in Access this is a presentation feature but because you set it at the table it seems as though it is "part of the table".

    I'm all for keeping as much validation as possible as close to the data as possible but this is one convenience too far.

    You want it to save time? Presumably you must have to use this\ these combos regularly - why not just copy and paste them to your forms as and when required?

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •