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 7690039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:18:20+00:00 2026-05-31T20:18:20+00:00

(Disclaimer – I’m not the database designer. I’m just the poor developer what has

  • 0

(Disclaimer – I’m not the database designer. I’m just the poor developer what has to make this work.)

There are 17 (at the moment) tables with identical structure – name, address, phone number.

Given a phone number, I have to check to see if there’s a matching entry in any of the tables, then return that address.

So, I created a view to get the list of tables (there’s a ref table that holds that info), then I created a stored procedure to

  1. create a temp table,
  2. using cursors, check each table in the view for the phone number, using sql concatenation. If a record is found, insert it into the temp table.
  3. return the rows from the temp table.

This all works in straight T-SQL.

Now, I’m trying to use Entity Framework 4+ to call the stored procedure. But the function import interface won’t generate columns. It says return type = none, and the LINQ code expects an int and won’t compile.

Any ideas on how to make this work?

I know I can move the check tables part to code, if I absolutely have to, but I’d rather have the above method work.

  • 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-31T20:18:21+00:00Added an answer on May 31, 2026 at 8:18 pm

    I don’t know the solution to the EF part, but in the database I’d just create the following view:

    select * from Table1
    union all select * from Table2
    union all select * from Table3
    union all select * from Table4
    ...
    

    Then you can use EF to query the view however you like. No need for cursors and such.

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

Sidebar

Related Questions

Disclaimer: I'm not actually trying to make one I'm just curious as to how
Disclaimer: I know this type of question has been asked here before, I just
Disclaimer: This is not actually a programming question, but I feel the audience on
Disclaimer: This is for a homework assignment, but the question is not regarding the
Disclaimer This is not strictly a programming question, but most programmers soon or later
Disclaimer, I'm not a PHP programmer, so you might find this question trivial. That's
Disclaimer: this question is purely informational and does not represent an actual problem I'm
Disclaimer: I'm new to most of this I just downloaded virtualbox yesterday and installed
Disclaimer: This question is not about fixing visual studio So, I've used VSS for
( Disclaimer: This question is not specific to ASP.NET) I have a control which

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.