MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 10th, 2004, 12:17 PM
Chauzer Chauzer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 47 Chauzer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 8 m 41 sec
Reputation Power: 5
changing one field updates 3 other fields, use a join?

i currently have a table like this..

Code:
user_id   username   app_id   app2_id   app3_id   app4_id
1           john        3         4            5           6
2           mike        4         5            6           6
3           manager     4         5            6           6
4           vicepres    5         6            6           6
5           ceo         6         6             6          6
6           board       6         6            6           6 


the basic pattern is... a user has approvers, and those approvers have approvers as well... i have 4 columns of approvers.. and if my first approver is the manager, then my second approver will be the managers approver and my third approver will be the managers approver's approver and so on..

on my actual page, i have select fields for the app, app2, app3, app4 and i need it so that when i change the very first app, it'll automatically update app2, app3, and app4

any ideas how i would do this? im pretty new to sql but im thinking i would use some type of join?

thanks

Reply With Quote
  #2  
Old May 11th, 2004, 02:19 AM
Username=NULL Username=NULL is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: TX
Posts: 249 Username=NULL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 7 h 6 m 42 sec
Reputation Power: 5
Send a message via Yahoo to Username=NULL
From your example, looks like the App_id to App1_id, App2_id, App3_id, and App4_id assignment is always the same?

Meaning that I woudn't see something like this?...
Code:
user_id   username   app_id   app2_id   app3_id   app4_id
1           john        3         4            5           6
2           mike        4         5            6           6
3           manager     4         5            6           6
4           test_1      4         7            3           8
5           vicepres    5         6            6           6
6           ceo         6         6            6           6
7           board       6         6            6           6 
8           test_2      6         9            11          12

...note that the red fields have diff appX_id assignment than previous records that have the same app_id.

Last edited by Username=NULL : May 11th, 2004 at 02:21 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > changing one field updates 3 other fields, use a join?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway