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 6578129

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:43:53+00:00 2026-05-25T15:43:53+00:00

I believe this is a toughie! I have 2 databases. Destiny and Source In

  • 0

I believe this is a toughie!

I have 2 databases. Destiny and Source

In Destiny I have a table, which contains a list of names of views.

Such as:

GasPriceSourceID    Name
1   ICIS Heren TTF Bid
2   ICIS Heren TTF Offer
3   ICIS Heren TTF Midspread
4   NPG Spot
8   AEQ SYS Sell
9   AEQ SYS Buy
10  ICIS Heren Gaspool Midspread

So first I will call the View: ICIS Heren TTF Bid on the database: Source
Then ICIS Heren TTF Offer and so on.

This will be done in a C# console application.

Normally I would use a ADO.NET Entitiy Data Model. But this creates a static model of the database – but views will be added and removed daily.

All the views return 3 things: ID, Date, and Value.

I need to move these prices to a table in the database: Destiny

So in short. Destiny has a list of price sources. Each source has a lot of prices, which will be put into a table on Destiny.

  • 0 0 Answers
  • 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-25T15:43:53+00:00Added an answer on May 25, 2026 at 3:43 pm

    Since you don’t provide enough details just some general pointers:

    • Build the SQL strings “manually” in the app
      NOT recommended and prone to problems (Security, Performance…)

    • Build a stored procedure which in turn builds and execute the SQL SELECT and returns a CURSOR
      Can be a bit more secure (esp. can avoid SQL injection) since the Stored Procedure would check for the existence of the View first…

    BTW: what exactly are you doing when you access those Views ?

    EDIT – after more information from OP:

    I suspect your model is a bit off… what you describe would VERY EASILY be solved by having EXCATLY ONE View with the columns Source, ID, Date, and Value.

    This would make all the dynamic SQL and the resulting problems just go puff… because then you could just use “normal queries” with a WHERE Source = 'ICIS Heren TTF Bid' for example… any other technology like EF and/or LINQ etc. would be available and working “out of the box”…

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

Sidebar

Related Questions

I believe this question might have been previously attempted in 2006 on a different
I believe this question has been asked a lot of times, and I have
--EDIT-- I believe this is a valid question that may have multiple answers (as
I'm inserting into an SQLServer table with an autoincrementing key field. (I believe this
Hi guys i believe this could turn out to be trivial but i have
Have just come across a problem where I believe this is the solution. At
I believe this is an AutoMapper basics question: I have an single article Entity
I believe this is OK, so I am creating a question that I have
I believe this is not the popular stance but I prefer embedded hacks such
I have been told and I'm not sure I believe this: Removing white space

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.