This seems basic, but I am very new to SQL Server. Probably so green that I am not even sure how to find this answer as I may not even be asking it correctly.
I've been tasked with moving an Access database to SQL Server to allow scalability. I have created a local instance, and moved tables without issue.
Now I have to convert the action queries that populated those tables. Access had an ODBC connection to 2 remote SQL servers, and it's own tables locally. The queries that I am moving were easy to design/execute using in Access, but I am challenged with scripting them in SQL. I am connected with the 2 remote servers in SQL Server Management Studio, but trying to reference remote tables for local insert queries has me confused.
I've been attempting the Selects and Joins with this syntax:
[server name].[database name].[schema].[table name]
What I am getting is "incorrect syntax near the keyword 'FROM'.
Again, if this is covered elsewhere, even a link would be helpful. As I said, I am just starting to learn this and may not be searching correctly.
Much appreciated!
Update - Using SQL Server Management Studio 2012. I did manage to add a link to the 2 other servers in the object browser. Now I need to find out how to be able to use both local and remote tables in one query.
INSERT INTO dbo.QUES_ANSWER_LABEL ( ques_data_id, label_id )
SELECT QFINITI.Qfiniti_Platform.dbo.eval_question_answer_label.ques_data_id, QFINITI.Qfiniti_Platform.dbo.eval_question_answer_label.label_id
FROM EVAL_CORE INNER JOIN EVAL_QUES_LNK ON EVAL_CORE.eval_id = EVAL_QUES_LNK.eval_id INNER JOIN QFINITI.Qfiniti_Platform.dbo.eval_question_answer_label ON EVAL_QUES_LNK.ques_data_id = QFINITI.Qfiniti_Platform.dbo.eval_question_answer_label.ques_data_id
WHERE EVAL_CORE.quality_date = CONVERT(DATETIME, '2013-12-02 00:00:00', 102);
This shows my attempt, and the error that I get is:
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "QFINITI.Qfiniti_Platform.dbo.eval_question_answer_label.ques_data_id" could not be bound.