#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep 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??
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,374
    Rep Power
    391
    Code:
    where StudentData.SettingID is not null
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by swampBoogie
    Code:
    where StudentData.SettingID is not null
    Thanks for your response but it doesn't work .
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,374
    Rep Power
    391
    Just saying that it does not work will not assist anyone trying to help you.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    3
    Rep Power
    0
    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

IMN logo majestic logo threadwatch logo seochat tools logo