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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:27:07+00:00 2026-06-11T10:27:07+00:00

I have two databases on separate SQL servers. They have been linked in SQL

  • 0

I have two databases on separate SQL servers. They have been linked in SQL Server. I can’t move the databases to the same server.

I am trying to use an inner join to display a small set of specific information. Basically I need to display one column from database A(NurQueryResults) if the VisitID = the Account Number from database B. I have succesfully connected to both databases (using a connection string) indivdually in the asp page with separate connection strings. I have verified the column names in each database. I’m getting a syntax error in my SQL code. Here is the code I’m trying to use:

    SELECT Response, VisitID, QueryID, RowUpdateTime FROM [dbo].NurQueryResults WHERE QueryID = FALL.RISK1

INNER JOIN [dbo].View_CareProviderWithPatientAtLocation
ON [dbo].NurQueryResult.VisitID = [dbo].View_CareProviderWithPatientAtLocation.AccountNumber    

ORDER BY RowUpdateDateTime DESC

I’m using Dreamweaver. The page is .asp and I’m have been using the Insert Recordset command. That is the area I am trying to enter the above code in to. I get the syntax error when I try the “test” button in the recordset window.

I have tried listing out the server/database name/table name for database B and still received the syntax error. Is it something incorrect in the SQL code? Or do you think it has to do with my connection to the linked server? Or should I be taking a completey different approach to get that data?

  • 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-06-11T10:27:08+00:00Added an answer on June 11, 2026 at 10:27 am
    SELECT Response, VisitID, QueryID, RowUpdateTime 
    FROM [dbo].NurQueryResults     
    INNER JOIN [dbo].View_CareProviderWithPatientAtLocation
    ON [dbo].NurQueryResult.VisitID = [dbo].View_CareProviderWithPatientAtLocation.AccountNumber    
    WHERE QueryID = FALL.RISK1
    ORDER BY RowUpdateDateTime DESC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two databases, on two separate SQL Servers (trying to consolidate both). This
Let's say I have two SQL Server databases running on separate machines, call them
Suppose I have two SQL Server 2008 databases, A and B. They initially were
I am using SQL Server 2008 R2. I have created two different databases Master
We have WebServer (based on Orchard CMS ) and two SQL Server databases: master
I have two SQL Server 2005 instances that are geographically separated. Important databases are
We have two databases, in two separate locations. One of the databases resides in
I have two physically-separate MySQL databases on which I have to run a single
I have two separate sets of tables in the same database that model the
I have two databases at two different places, both databases are same with table

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.