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 2005 Forums
 Transact-SQL (2005)
 How do I insert column records to a table

Author  Topic 

svgeorge
Starting Member

23 Posts

Posted - 2007-09-18 : 09:42:01

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-09-18 : 09:42:56


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-18 : 09:43:07
alter table MyTable add columnName ...

look up Alter table

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

svgeorge
Starting Member

23 Posts

Posted - 2007-09-18 : 09:48:12
How do I insert column records to a table from another table

There table i want to update is Payment_LIST_AIMS and the column is Enrollment_ID
from table V_1st_Enrollment_Agency_Payment_List and column from where data to get in this table is Enrollment_ID
the data needs to be updated in Payment_LIST_AIMS WHERE(Payment_LIST_AIMS.Payment_Type = '1') OR
(Payment_LIST_AIMS.Payment_Type = '10') OR
(Payment_LIST_AIMS.Payment_Type = '19') OR
(Payment_LIST_AIMS.Payment_Type = '30') OR
(Payment_LIST_AIMS.Payment_Type = '39') OR
(Payment_LIST_AIMS.Payment_Type = '48') OR
(Payment_LIST_AIMS.Payment_Type = '57')




i amd using the below SQL script is that correct
but error is comming..
INSERT INTO Payment_LIST_AIMS(Enrollment_ID)(select Enrollment_ID from V_1st_Enrollment_Agency_Payment_List)
WHERE(Payment_LIST_AIMS.Payment_Type = '1') OR
(Payment_LIST_AIMS.Payment_Type = '10') OR
(Payment_LIST_AIMS.Payment_Type = '19') OR
(Payment_LIST_AIMS.Payment_Type = '30') OR
(Payment_LIST_AIMS.Payment_Type = '39') OR
(Payment_LIST_AIMS.Payment_Type = '48') OR
(Payment_LIST_AIMS.Payment_Type = '57')


Pheale help
George
Go to Top of Page
   

- Advertisement -