One big thing to realize - SQL is not always SQL. The basics of SQL are the same from one product to another, but the intricacies can be different.
MS Access uses Jet SQL
Oracle uses PL/SQL, SQLPlus, and maybe other versions
MS SQL Server uses Transact-SQL (TSQL).
IIF is different in the languages. IIF in Access is comparable to CASE in SQL Server. There are other 'gotchas'. So be aware of this. Even SQL experts can be caught by the differences.
-SQLBill
The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875