AS400 Administrators vs SQL Server DBA's

AS400 people tend to be old, they could be your dad but the earn a lot respect. They're usually good in what they do.

Until you confront them with SQL. For some reason the AS400 folks think completely different then DBA's and I'm not pointing any finger at DB2 guys. Let me clarify: I've been in two discussions where I was asked to import data from a member file on DB2. According to the AS400 people, your query should look something like the following:

SELECT * FROM LIBRARYNAME.FILENAME.MEMBERNAME

What's wrong with this picture? In SQL this would go totally wrong as the syntax is:

SELECT * FROM DATABASENAME.OWNER.TABLENAME

SQL will think the FILENAME is actually the OWNER and this is where it goes wrong (not only in the result but also in your discussion with the AS400 guys)
Luckilly there is a simple and clean workaround...ALIASSES

The syntax goes like this:

CREATE ALIAS Foobar FOR FUZZYBEAR

where FUZZYBEAR is actually the member file so the SQL quys can query the alias.

Steve

 

Published Wednesday, August 01, 2007 4:59 PM by Steve
Filed under: