Arrao4u

…a blog by Rama Rao

Archive for the ‘How to copy from one table data into another table’ Category

How to copy from one table data into another table

Posted by arrao4u on December 10, 2009

select * from assignment

insert into assignment(location_id,assignedtorolename,assignedto)

select location_id,’Pre Sale Manager’,'nd2145′ from dmslocation where city=’Delhi’

ex:

select* into edms..dmstemptable from dmstemptable 

select  *

 

 into edms..dmsemail from dmsemail

 

select

 

l.city,c.business_type,count(distinct convert(varchar,c.location_id)+convert(varchar,c.level3code)) from dmslocation l

inner

 

 join category_transaction c on l.location_id=c.location_id and c.status<>‘D’ where l.city=‘Jodhpur’ group by l.city,c.business_type–25924

 

 

Posted in How to copy from one table data into another table, SqlServer | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.