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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 switching database design, moving data

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2002-05-21 : 22:00:31

Hello,

I have a website I am working on, and it used snitz forums (in case anybody has previous experience) The problem is the original website design held the forum members and the website members in separate tables, now I think for speed reasons I would like to combine the two tables without losing any data. Each username in my first table is also located in my second table. My tables are like so

tblUserDetail = UserID,nameOnline
FORUM_MEMBERS = m_name, userID

The userID in FORUM_MEMBERS is currently null. I need to get all the userID's (which by the way is an identity) from tblUserDetails into FORUM_MEMBERS where tbluserdetail.nameonline equals forum_members.m_name.


Cheers!
Mike

dsdeming

479 Posts

Posted - 2002-05-22 : 08:03:46
Try

UPDATE FORUM_MEMBERS
SET FORUM_MEMBERS.User_ID = t.User_ID
FROM FORUM_MEMBERS
JOIN tblUserDetail t ON t.nameonline = forum_members.m_name


Go to Top of Page

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2002-05-22 : 12:34:24

THANK YOU!!!!

Go to Top of Page
   

- Advertisement -