Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Bit of MSSQL Code need help with

$
0
0

All

I have a sql server, with two databases on. I want to copy two columns with data from database B to database A as below:

USE Database A;
Insert into cases(CaseCode, CaseName)
Select casecode, name FROM DatabaseB.TableA_case;

It errors on:
[Err] 42S02 - [SQL Server]Invalid object name 'DatabaseB.TableA_case'.


I know I need to use the table somehow, but am unsure what to do, can anyone help?


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>