Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to formthis update query

Author  Topic 

jatrix32
Starting Member

49 Posts

Posted - 2010-10-04 : 10:17:11
I want to update a table based on the information from another table.

I have LastName, FirstName, Misc1, sub_user_number and group_id.

the user in Subscription table must be updated from the update table.

The unique identifier would be the sub_user_number. So how would the query look when it has to go into the subscription table, check and see if the user from the update table is there, and if so, update the above fields.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-04 : 10:18:30
answered here

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151030

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jatrix32
Starting Member

49 Posts

Posted - 2010-10-04 : 10:25:14
what is a single join?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-04 : 10:27:21
inner join

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jatrix32
Starting Member

49 Posts

Posted - 2010-10-04 : 10:54:23
What is the difference between the two types of joins?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-04 : 11:02:36
which type? single join is not a type. i just meant single (1) join is enough

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jatrix32
Starting Member

49 Posts

Posted - 2010-10-04 : 12:37:36
I don't have much experience with joins, that's why I wasn't sure what I was even talking about. When you say to use an inner join, what does that mean?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-04 : 12:42:00
see here to know about joins

http://www.w3schools.com/sql/sql_join.asp

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -