Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2006, 05:46 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default copying values into a column from another table

Need a little help to try and get around my problem.
A nominal table in linux creates a priod eg nomhist_1206
I done an open query in a view to look @ this table but I have a n issue where the nomhist table has values in eg code1, code2, and in code3 but the next homhist table nomhist_1106 has in code1, code2 values are in code3 etc.

So I placed the view into a table then done a search and removed the to nulls then search for a value using if's and put it into a temp table.

I then set code1 to null hoping that I could update

code1 on the temp table to code1 but it doesn't seem to work.

Update f_TM1_nomhist_0105
Set code1 = b.code1
from f_TM1_nomhist_0105 a, #rob2 b
where
a.code1 is null

Its like a copy and paste!! delete code1's values then replace them with the temp table. It inserts 7500 in all rows??

Reply With Quote
  #2 (permalink)  
Old December 8th, 2006, 03:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Where do you use a join between those two tables?

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying from one table to another Clive Astley VB Databases Basics 2 August 23rd, 2005 12:48 AM
how to make column of table 1 = to column of table gilgalbiblewheel Classic ASP Databases 4 October 11th, 2004 11:57 PM
copying from table 1 inserting in table 2 gilgalbiblewheel Java GUI 0 September 15th, 2004 03:40 PM
Copying Table Relationship Diagram mike123abc SQL Server 2000 1 February 19th, 2004 09:16 AM
copying array to table (reverse of getrows?) rachelow VB Databases Basics 0 July 19th, 2003 03:10 AM



All times are GMT -4. The time now is 08:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.