Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6125703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:16:42+00:00 2026-05-23T16:16:42+00:00

I want to dump view data to a table.I have a VIEW that does

  • 0

I want to dump view data to a table.I have a VIEW that does a lot of case/algorithms/ like this: (dont concern yourself with this code just yet…)

    select  c1.a as car, c1.b as boat, c1.c as tree    convert(char(1),
 dbo.aa(l1+l12+l314)) as something1,    convert(varchar(9), dbo.bb(l1+l1+l13+l14, 2)) 
as something2,   bo.bb(l1+l12+l13+l14, 3) as something3,    convert(char(1),
 dbo.aa(l1+l1+l1+l14)) as something4, case when dbo.aa(l1+l12+l13+l14, 2) like 
'ttt'  then convert(varchar(20), bb(l1+l12+l13+l14, 5))     
 else null ............... etc..

On insert I want this VIEW’s data to be dumped into a table.

DO I hard code a cascade on insert when I create this view? OR

DO I create a instead of trigger on insert to dump to table?

Either way, how would I code it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:16:43+00:00Added an answer on May 23, 2026 at 4:16 pm

    Don’t insert via the view. If the view has complex logic in it, it may be impossible to map back to the underlying table/s and an insert might not be possible.

    For example, using your sample: if the view is updated to have a different value for the something1 field, how is this value to be de-constructed to the correct underlying values for l1, l12 and l314?

    Use a stored procedure instead and ensure that the application uses that and does not attempt to update the view.

    You can create triggers on all the underlying tables that will query the view and update the data in the extra table you want, though this seems to defeat the point of the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to dump data from db to file in view. But I have
I have an sql table that I want to dump to an outfile. The
I have two databases. I want to dump data from one table in 1st
I have a table (dump) with transactions, and I want to list the total
I have a FloatBuffer of known size and just want to dump the data
I have a text file that is formatted like JSON, but in a print/view
I have one view page (MyView.aspx) and many data sources to bind on this
I have a memory dump that I'm using to troubleshoot a client issue. This
Seeing lots of SOAP/RDS stuff, but just want to dump some MySQL data and/or
I want to import an oracle dump into a different tablespace. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.