How to use 'UNION' between two different databaseservers

Hello,
Could someone help me out. I am trying to find out if and how to use 'UNION' between two different databaseservers.
We have 2 different queries, each queries on a different database; one MySQL the other MSSQL.
Could someone tell me how to use 'UNION' between thes 2 queries?
Thanks in advance,
Samir Benalla

Hello
You may use openrowset statement, (OPENROWSET (Transact-SQL))., but before you use this, you must configure your server
sample:
SELECT a.*
FROM OPENROWSET('SQLNCLI', 'Server=Seattle1;Trusted_Connection=yes;',
     'SELECT GroupName, Name, DepartmentID
      FROM AdventureWorks2012.HumanResources.Department
      ORDER BY GroupName, Name') AS a
UNION
     SELECT GroupName, Name, DepartmentID
      FROM AdventureWorks2012.HumanResources.Department
      ORDER BY GroupName, Name
With this you can define a connection using native client to server Seattle1, and execute a query there, The results will be spooled on your server.
Connectionstring
Server=[SERVER_NAME];datasource=[YOUR DATABASE NAME];user_id=sa;password=sapassword'
if you use FQDN on your Query, than the datasource parameter in connection string can be letf out.
Regards
János.
take care of performance, it can be very slow,

Similar Messages

  • How to use thunderbolt between two mac

    how to use thunderbolt between two mac? i would like to transfert files to my macbook air ...Thanks

    You can use target disc mode:
    http://docs.info.apple.com/article.html?path=Thunderbolt/10.6/en/8443.html

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

  • How to route traffic between two different interfaces

    Hi,
    I need to setup a routing between two different interfaces on a host.
    Inferface ce1 : 192.168.120.12
    Inteface ce2 : 192.168.110.50
    Is it possible to add a route which enables the ce2 interface to catch packets from the ce1 interface ?
    Regards,
    Armin

    The problem is a application which is only able to listen on one interface.
    To fix this, I have to make all packages visible on one interface.

  • How can i use eyedropper between two different art board.

    Hi
    How can i apply the same color for the images in two different art boards with eyedropper.
    I am trying to apply the same color from the image in one art board to another image in another art board.
    Can any one help me please. Thanks
    Steve
    I am using Mac

    apresslink,
    Presuming you are unable to use the Eyedropper Tool normally, in other words keep the target object selected while you pick up the colour, by having the Artboards open in adjacent windows to ClickDrag between (I am still with 10 which may explain at least part of my ignorance for which I apologize):
    Until someone presents a smarter solution, you may cheat and create a carrier object beside the  source object, drop the colour in that, cut and paste it to be beside the target object, and drop the colour there. With multiple colours to drop multiple times, you may create a palette to hold them, to use just like a painter working on several canvases at the same time. Or you could paste diminshed copies of the source objects.

  • How to establish connection between two different IP Range

    Hi All,
    Currently in my office  there are two different ip range that we are using one for the Wi-FI(192.168.1.X) & 2nd  for local machine & servers 192.168.2.x series ip.
    In current situation if any Wi-Fi user(Laptop User) wants to communicate with local machine or server then he has to switch from Wi-Fi to Lan.
    So is there any way to provide communication between Wi-Fi & local network.
    if this happen then there will be no need to switch from Wi-Fi to Lan, Wi-Fi user who has ip range 192.168.1.x is easily communicate with local machine & server(192.168.2.x).  
    Shailendra Vishwakarma

    Thanx for the reply..
    In my office i am using Microsoft Thread management Gateway(Software Firewall).
    Can i set Security like as below,
    Users can connect Wi-fi Network but they would not able to access  internet but  they should be able to access for local network & for the internet they should go via Microsoft Thread management Gateway.
    Thanks,
    Shailendra Vishwakarma

  • Need Help Understanding How To Use iMessage Between Two iPhones

    I have an iPhone 4 and my wife an iPhone 3GS.  We both have iOS 5, but I have discovered something about iMessage I need to make sure I understand correctly.  As I understand it iMessage can send text even if our voice carrier service is unavailable.  I tend to loose signal inside the building I work in.  I usually can get texts in and out, but sometimes not.  But in testing the two phones sending iMessages, I've noticed is that if I have one of the phones with iMessage turned on and the other with iMessage turned off, the two phones will not be able to exchange text.  Is that how it's supposed to work?  Even though one of these phones can receive an iMessage doesn't mean the other one send one back.  Can't the system detect when one phone is connected and another one not, and the one that is not gets sent SMS messages instead?  I don't want to try to send my wife an iMessage because I can't get a voice signal in my building, but her have iMessages turned off and not able to get any messages from me, iMessage or SMS.  I guess I need help better understanding how this actually works between the two phones so I can always get texts back and forth between my wife and I.  My other misgiving is that this iMessage thing consumes my data limit.  My wife gets unlimited because she had her phone before the limits were imposed, but I got on board after, so I am hesitant to use iMessage all the time because of it.  I have no intention to send picture mail through iMessage, but the thing is if I wanted to switch to SMS to send picture mail to save data, but my wife's phone is set to iMessage, she won't get it.  If this is how this thing is supposed to work, I'm not really impressed.  Some insight would be appreciated

    I think you are making this way too complicated. Why are you turning iMessage off? If you are at your office connect to the WiFi there and send your wife messages that way (unless your office is blocking the port iMessage uses). When possible the two phones will use iMessage but will revert to SMS is iMessage is not available if that option is set that way.
    I would not worry about using up your data plan if you have the 2GB, text iMessages are going to be very small and MMS (picture) ones are not very large either. Unless you are sending hundreds of picture iMessages a day you will have a hard time using up your data.
    If you are near an Apple Store you should explore signing up for an intro iPhone course and have them run through iMessage options.

  • How to automatically switch between two different Wi-Fi settings?

    Hello,
    I have to work with two different Wi-Fi (at home and office) one of which uses DHCP and other requires me to manually enter IP address. Right now I have to keep on changing Wi-Fi settings (putting IP addresses when at office and setting to DHCP at home) whenever I go from home to office and then do the reverse when I go from office to home. Can I automate that so I don't have to repeatedly fiddle with settings?
    Using OS X Mavericks 10.9.3.

    In System Preferences > Network settings unlock the settings as an admin user and then click the 'Location' popup (normally set to Automatic by default).
    Create a new 'location', then tweak the settings & apply them.  Repeat this for the other collection of network settings with another 'location'. The Locations can be switched as needed in the 'Apple menu > Location' (this appears when you have multiple locations.
    Apple explain it at…
    http://support.apple.com/kb/HT2712
    There are ways to change this automatically, but they are generally quite involved…
    http://hints.macworld.com/article.php?story=2005010613401823
    I suspect there is an app that will do it if you search around (manual switching seems good enough IMO).

  • How can I share between 2 different accounts.  we have a clinic that serves pediatics and unfortunately, they set up two different accounts within our agency.

    How can we share between two different accounts on the same iPad?  We have a therapy clinic with 2 devices and want to share apps. I did not set up the second one, but how can we fix this ?

         Hi Rosdy, to get the most out of iCloud it is recommended that you use the same account between devices. Thus whenever you buy something on your phone it becomes accessible from your laptop regardless of whether your synced it over usb or not. *
         For more information on iCloud usage please click here.
    * This feature requires that both devices be on the same WiFi network.

  • I would like the share an iTunes library between two different accounts on one Mac. How do I do this?

    iTunes no longer works properly (aka at all) while using one of the user accounts set up on my iMac. It does, however, work when logging in under another user account on the same iMac. (if any of you can help me solve this issue that would be perfect). If there is no solution can anyone help with my request to share an iTunes library between two different accounts on one Mac. How do I do this?

    jc_hering wrote:
    that works for anything he purchases after he creates the new account.  What about his current music that currently resides in my itunes library?  How can I get his current music out of my library into his new account/library??  Thanks..
    Copy it to his computer into his iTunes library and authorize his computer with the iTunes account used to purchase them..
    You cannot tranfser items from one iTunes account to another. Purchased items remain part of the iTunes account is was purchased with.
    iTunes account - used to purchase items
    iTunes library - where purchases (and CD RIPs) go on the computer

  • How to transfer app data between two different game center accounts?

    Hello, I really need some help.
    I have looked all over the web for ways to transfer apps between two different game center accounts and different devices. Several weeks ago I started playing Campus Life on my relative's Ipad 2, therefore spending many long hours to get to this point in the game.
    The problem is I just got an Iphone 5 and I really would like to transfer the data onto it, so that I would not need to start all over again.
    My grandma has an account (Game Center) onto which the data has been saved and I would like to have it stored onto mine. On some forum someone said to sign into the account which has the data on both devices and to then open up the game on the new device. It worked. Then I signed out and logged in with my own account- the game started from scratch. I panicked. I went back on the other account, and the data reappeared. I have been going back and forth, the game changing as many times. I thought it would ask to back up my grandma's data on mine but I was wrong. I can not seem to save the game onto my new account, and I have even tried to back it up to Itunes and then copy it onto my phone after having signed into my own account. And I don't know how to properly use Icloud. I am a mess. I am completely lost and have found no help on the web. (All people seem to have to deal with is sharing Apple IDs with different Game Center Accounts for the kids and transferring apps from one of their devices to another.)
    I am so worried I am going to mess up and will lose the whole thing completely.
    I have just started another game with my own account but since I am using my grandma's, the data is erased. It's one or the other but I definitely prefer saving Campus Life. I do not like the idea of having to only pick one.
    I do not know any technical terms, so if you understand or even have the slightest clue about what I am talking about, I applaud you.
    This seems like mission impossible, so if anyone can help in any way, I would be really grateful. 
    Thanks in advance for your time and thoughts!

    I meant to press on "This solved my question"... Sorry if you needed the points.
    Thank-you and I will just go back and forth between the accounts.

  • Use of SAP memory to transfer data between two different sessions.

    Hello experts,
    I wish to know how to use SAP memory to transfer data between two different sessions.
    The scenario is that when I run a report and change a variable, the value of changed variable should be availabe to another user on another terminal.
    Thanks & Regards!
    Sumit

    Hello,
    Just to add what Max has already mentioned. IMPORT TO / EXPORT FROM DATABASE statements can be used to store data in special "cluster" tables (you can't use any DDIC table) e.g., INDX.
    @OP: You can opt for Shared Memory(SHM) for this specific requirement as well. In my opinion SHM is a bit tricky to code, but it is easier to monitor. The opposite holds true for "data clusters".
    You should remember SHM is app-server specific. So if you've a load balancing scenario, using SHM can cause problems.
    Hope i'm clear.
    BR,
    Suhas
    Edited by: Suhas Saha on Nov 19, 2010 4:12 PM

  • HT3819 How to use homesharing between different user accounts on the same iMac?

    I find plenty of articles about homesharing on iTunes between computers, but not between two different user accounts on the same iMac.  Any advice or direction to an existing artical is greatly appreciated.  I'm knew to the Mac and still have Windows on the brain.
    I am trying to share iTunes music and movie purchases between my user login and my wife's.
    Thanks

    Hello careymp1017,
    This can be achieved, but will not utilize HomeSharing. Further information and steps can be found in the following article.
    iTunes: How to share music between different accounts on a single computer
    http://support.apple.com/kb/HT1203
    Cheers,
    Allen

  • How can I use music from two different iTunes accounts?

    how can I use music from two different iTunes accounts?

    If you mean iTunes Store accounts, there's really nothing for you to do. Just add the tracks to the iTunes library and play them. Music purchased prior to late-2009 will been to be authorized, though. Pull down Store > Authorize... and type the credentials of the Apple ID used to buy the tracks.
    If you mean something else, please describe in more detail.

  • How do I Sync my itunes music between two different computers

    Can anyone tell me the step-by-step instructions for how to Sync my itunes music between two different computer.... one Mac at work and a second at home. I want to bring over all my work music onto my home Mac, some of which is the same but much of it is different.

    Are you able to connect the two computers in any way? For instance is the work computer a laptop that you can bring home and network with your personal one? If the two devices are connected in some away there are a few utilities that can help you sync iTunes across different computers. You could begin your research by having a look at these for instance:
    TuneRanger
    SuperSync
    syncOtunes

Maybe you are looking for