Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 8819 |  Welcome, Guest!   Register  Login
 Home > Forums > Sql Server > how to write coding to convert data from one table to another ...
Amritha444

how to write coding to convert data from one table to another

Replies: 1 | Posted by: Amritha444 on 5/2/2011 | Category: Sql Server Forums | Views: 536 | Status: [Member] | Points: 10  


Hi all

I want to convert data from one table to another by using cursor

My case is

I have table App_Profile and have data's in it i want to convert datas corresponding to particular id to another table emp_Profile.There may be more than one rows for each id...whatever be the number i want whole data corresponmding to that id to another table ..

Can anybody suggest idea i want to write code in backend side

Thanks in advance


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

T.saravanan
T.saravanan  
Posted on: 5/2/2011 3:53:47 AM
Level: Silver | Status: [Member] [MVP] | Points: 50

Resolved

Hi,

Try this one.....

insert into table2 (Id,Name)

select nID,sName from table1 where nID = 2


In this query table1--> Input Table
table2 --> Output Table




Thanks,
T.Saravanan

Amritha444, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/20/2013 2:28:40 PM