Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 8th, 2007, 08:33 PM
Registered User
 
Join Date: Aug 2007
Location: Lynchburg, VA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to RJ2001 Send a message via AIM to RJ2001 Send a message via MSN to RJ2001 Send a message via Yahoo to RJ2001
Default Need help linking userID fields

I am creating a massive website for my Residence Life Department, using MS SQL as its backbone and PHP as the interface.

The part I need help with-

I have a user table with a lot of user info id, name, password, etc. It also contains a jobTitle field. For instance someone can log in who is a HD (Hall Director) who is in charge of an entire building. Now I have a separate Table named HD with 2 Fields ID and ACID (AC is for Area Coordinator someone in charge of a group of buildings).

I want to be able to assign an auto generated ID to the HD table that will link to the specified user from the USER table, without putting a separate field in the USER table. Why I want to do this is because I will have forms that are linked through many foreign keys and joins that refer back to these two ID's, but the person can switch buildings from year to year which then I would generate a new ID for them all without having to create a new USER table entry for them.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking table Date fields by month wintermute Access VBA 4 April 3rd, 2008 04:35 AM
Linking 2 data fields from 1 table aRtware Access 7 May 28th, 2006 11:23 PM
UserId/Computer Name mrookey Dreamweaver (all versions) 1 August 2nd, 2005 11:47 AM
UserId/Computer Name mrookey SQL Server ASP 1 August 2nd, 2005 07:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.