I have Two Database on Same Server and I want to get Record from two Database in Single Sql Query Or Stored procedure
Server : 192.168.1.1
Database1 : Customer
Database2 : Product
DB : Customer à Table : CustomerPurchaseMaster
| ID | CustomerName | ProductID | OrderAmt |
| 1 | James | 1 | 125 |
| 2 | James | 2 | 220 |
| 3 | James | 3 | 300 |
DB: Product à Table : ProductMaster
| ProductID | ProductName |
| 1 | Pendrive |
| 2 | Mouse |
| 3 | Router |
Required Result Table Output
| ID | CustomerName | ProductName | OrderAmt |
| 1 | James | Pendrive | 125 |
| 2 | James | Mouse | 220 |
| 3 | James | Router | 300 |
Nanhe SiddiquePosted Apr 24, 2015, 7:25 AM
PnklPosted May 5, 2015, 8:54 AM
Also, Your Answer is a accepted.
Thank you to Rajeev Ranjan And Nanhe Siddique
Rajeev RanjanPosted Apr 24, 2015, 7:48 AM
As i have seen your question.
This can be done by the three simple steps
1) Create a Link sever ( this process is done by any server admin)
2) get the Link server path
3) write our query [
PnklPosted Apr 24, 2015, 7:19 AM
I have to get record from two Different Database not from single Database in single query
Sneha SnehaPosted Apr 24, 2015, 6:21 AM