Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Insert data from other tables using select query
WhatsApp
Venkatesan Jayakantham
12y
2.2
k
0
0
25
Blog
Here is the query to insert other tables data into the existing table in sql server
insert into AdventureWorksDW2008R2.dbo.SafetyStockLevel(productID,safetystocklevel,OrderDate)
(
SELECT distinct p.ProductID, SafetyStockLevel,OrderDate
from dbo.Product p inner join
dbo.SalesOrderDetail SOD
on sod.ProductID = p.ProductID
inner join dbo.SalesOrderHeader SOH
on soh.SalesOrderID=sod.SalesOrderID
)
Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech.
http://www.kaashivinfotech.com/
Insert data from other tables using select query
Up Next
Bulk Insert into table using User-Defined Table Type
Ebook Download
View all
SQL Queries For Beginners
Read by 18.3k people
Download Now!
Learn
View all
Membership not found