I have 3 Database
- ECPNWEB
- ECPNDB
- ECPNPOS
and also 3 tables
- account -> ECPNWEB
- branch -> ECPNDB
- terminal -> ECPNPOS
and the tables having multiple columns
- account (accntid,managedby,account,first,last,....)
- branch(branch_code,company_code,name,distributor,cutoff,....)
- terminal(retail,brand,model,serial,status,....)
All I want to do is to get the specific column., my desired output is:
managedby for table account and ECPNWEB database
name for table branch and ECPNDB database
model for table terminal and ECPNPOS database..
Like this
|managedby|name|model
Thanks in advance
sp_addlinkedserver()
is what you needexec sp_addlinkedserver @server = '*server_name*'
//---replace *server_name* with yoursselect * from [server].[database].[schema].[table]
I'm not about it but try this and tell me what is the o/p. For example you can try this way
EDIT2: try this,not sure this will give u desired result, not tested... replace *column_name* with yours