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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:14:05+00:00 2026-05-24T07:14:05+00:00

I need to query two tables in two different databases on the same SQL

  • 0

I need to query two tables in two different databases on the same SQL Server. On one table, I need to get all the rows (simple select) and on the other, a select but where the id matches a parameter in my stored proc.

I tried doing this but get the error

The multi-part identifier could not be bound.

How can I go about this?

QUERY:

  SELECT QUALITY_CENTER, POSTCODE_ID, (SELECT   [QCID]   
  FROM [Website_Interactive].[dbo].[IIPCentre_UserObject]
  WHere LoginID = @loginID)
  FROM IIP_QC_LIST
  • 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-24T07:14:05+00:00Added an answer on May 24, 2026 at 7:14 am

    Sounds like you mistyped something. You can query a table in another DB using the following method:

    SELECT tn.ID, tn.NAME
    FROM [Database Name].[Schema].[TableName] as tn
    

    I purposely added a two word database name because you have to put square brackets around that for it to be recognized. Your Schema will most likely be dbo.

    If you show us your query and give us the DB names I can provide a more complete answer.

    UPDATE:

    Are you sure you are spelling “Center” correctly? I noticed you spelled it “centre” in IIPCentre_UserObject which I think might be right for the UK (?) but you spelled it “center” for QUALITY_CENTER. I would assume it’s spelled one way or the other in your environment.

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

Sidebar

Related Questions

I need to execute a SQL Query between two databases. Example: SELECT * from
I need to pull values in similar tables from two different databases, combine them
i have the following query to list the employees of two table. i need
I have a SQL query (MS Access) and I need to add two columns,
Need to query my SQL server from Access using an ADO connection (for example),
I need to query the table for all but keyword. Using just - doesn't
I need to make two queries on two different tables and the data isn't
I need to compare the final balances of two tables from different clients grouped
Why the two query below return duplicate member_id and not the third? I need
I need to run a JOIN query on a solr index. I've got two

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.