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
 update stm or insert

Author  Topic 

aakcse
Aged Yak Warrior

570 Posts

Posted - 2009-07-02 : 08:57:43
I have to update a table based on value for the the one col of the same table.

I am inserting rec into table Tab_A from tab_B

where in tab_B has a
col1 values as 4523,3434
col2 values as 'use 12345678','123412345','use 3434','use 4523'

so in tab_A's col1 i want to insert values same as tab_b's col1 '1234','3434'...
however
in col2 of tab_a i want to insert values from col2 of tab_b
but where ever I have 'use 3434' kind of values i want to use
tab_b col2 values.

kindly help

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-07-02 : 09:06:27
Sorry, i am totally lost here. Don't really know what do you want.
Please take a look here http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx and re-post your question


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2009-07-02 : 10:21:49
quote:
in col2 of tab_a i want to insert values from col2 of tab_b
but where ever I have 'use 3434' kind of values i want to use tab_b col2 values.


aren't they both same?
Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2009-07-02 : 11:28:22
Sorry for confusing... now the requirement is changed we are waiting for new request...Thanks all appreciated
Go to Top of Page
   

- Advertisement -