Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Insert data to multiple tables

(0) ShareShare
ReportReport
Posted on by 795

Hi,

I have a view in different database and three tables to different database.I want to insert view data to all these tables to their corresponding columns at once.

Can you please suggest me a way?

*This post is locked for comments

  • Verified answer
    Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Insert data to multiple tables

    If as Mahen is asking, if your question is regarding creating a SQL Server view and has nothing to do with CRM, you should definitely post this in the SQL Server Forum.

    Regardless, you can go to SQL Server, expands views, create a new view and use the designer to establish the relationships between the three tables.

    Simply add the tables using the designer and drag and drop.

    Hope this helps.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Insert data to multiple tables

    You could export the data from CRM into excel and then use SQL Server Import/ Export Data wizard to import the data.

    Check these links-

    www.mssqltips.com/.../simple-way-to-import-data-into-sql-server

    searchsqlserver.techtarget.com/.../The-SQL-Server-Import-and-Export-Wizard-how-to-guide

    Hope this helps

  • Mahendar Pal Profile Picture
    45,095 on at
    RE: Insert data to multiple tables

    Assuming you are talking about non CRM custom tables and as this is SQL specific question, I will suggest you to post your question to SQL server forums to get quick response.

  • CRM Beginner  Profile Picture
    795 on at
    RE: Insert data to multiple tables

    I am using SQL Server..basically i have a view in Sql ..And i want whole view data to get split in three tables in SQL Server

  • Mahendar Pal Profile Picture
    45,095 on at
    RE: Insert data to multiple tables

    what do you mean by multiple table ? which environment you are using ? share some more details

  • CRM Beginner  Profile Picture
    795 on at
    RE: Insert data to multiple tables

    For inserting data in CRM is done using my entity framework, i just simply want to execute SQL query for now which will dump View data to multipl tables

  • Mahendar Pal Profile Picture
    45,095 on at
    RE: Insert data to multiple tables

    Executing insert SQL query against CRM db is not supported , even though it's possible technically in on premise, and you used online tab in your question, so I am assuming you are using online where you don't have access to DB

    That's why I suggest to use SDK

    Please let me know if my understanding is not correct?

  • CRM Beginner  Profile Picture
    795 on at
    RE: Insert data to multiple tables

    Sorry, I think u mistaken my question..I want to write write SQL Query to send View data to three tables at one go

  • Mahendar Pal Profile Picture
    45,095 on at
    RE: Insert data to multiple tables

    You can use CRM SDK to insert data to multiple entity. Download SDK you can get sample code there.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans