How to Write and Join SQL Statements in AS/400

The Microsoft SQL Server engine lets you link to external databases such as the IBM AS/400 database. You use the link to create join statements to query tables on the IBM servers. The interface for the linked servers lets you centralize your SQL Server queries and retrieve information from the SQL Server Management Studio software.

Instructions

    • 1

      Open the SQL Server Management Studio software. Log in to the database server from which you want to connect to the AS/400 server.

    • 2

      Right-click the "Linked Servers" icon in the left panel and select "New," then click "Linked Server." A configuration window opens.

    • 3

      Type the name of your AS/400 server. Type the username and password required to connect to the server. Click "Connect" to connect to the server.

    • 4

      Click the new linked server icon for the AS/400 server in the navigation panel and click "New Query."

    • 5

      Type your AS/400 SQL query. For instance, query a list of accounts in the "accounts" table in the "mydb" database:

      select *
      from as400.mydb.accounts

Related Searches:

References

Comments

Related Ads

Featured