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

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old March 24th, 2012, 08:07 AM
suny100 suny100 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 3 suny100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 33 sec
Reputation Power: 0
Update table problem

here is my query which I want it to update the secretNO1 coulmn in firstterm table automatically when it's value entered in table studentdata , when I run it , it make noooooo changes

There is a relationship 1 to 1 between them

update FirstTerm
set SecretNO1 = StudentData.SecretNO1
from StudentData
inner join FirstTerm on FirstTerm.SettingID=StudentData.SettingID where StudentData.SettingID <> null


Please where is the problem??

Reply With Quote
  #2  
Old March 24th, 2012, 10:07 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 2,352 swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 4 Days 9 h 55 m 58 sec
Reputation Power: 390
Code:
where StudentData.SettingID is not null 

Reply With Quote
  #3  
Old March 24th, 2012, 11:21 AM
suny100 suny100 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 3 suny100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 33 sec
Reputation Power: 0
Quote:
Originally Posted by swampBoogie
Code:
where StudentData.SettingID is not null 


Thanks for your response but it doesn't work .

Reply With Quote
  #4  
Old March 24th, 2012, 11:49 AM
swampBoogie swampBoogie is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: Paris Uppland
Posts: 2,352 swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level)swampBoogie User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 4 Days 9 h 55 m 58 sec
Reputation Power: 390
Just saying that it does not work will not assist anyone trying to help you.

Reply With Quote
  #5  
Old March 26th, 2012, 09:23 AM
suny100 suny100 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 3 suny100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 33 sec
Reputation Power: 0
Quote:
Originally Posted by swampBoogie
Just saying that it does not work will not assist anyone trying to help you.



when I try to run this query it give me message that "0 rows was affected by this query" but it must give me there are number of rows was affected as they meet the criteria

thnx

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Update table problem

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap