Subject: copying values into a column from another table
Posted By: madrob3975 Post Date: 12/6/2006 4:46:22 AM
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 By: happygv Reply Date: 12/8/2006 2:31:06 AM
Where do you use a join between those two tables?

_________________________
- Vijay G
Strive for Perfection

Go to topic 53363

Return to index page 99
Return to index page 98
Return to index page 97
Return to index page 96
Return to index page 95
Return to index page 94
Return to index page 93
Return to index page 92
Return to index page 91
Return to index page 90