Upgrading MDB SQL to ADP

K

kevin Flock

I have the following Query in MDB with linked tables and
it works fine. However I do not understand enough of the
syntax for converting this for SQL. I keep running into
problems with the "between" and "and."

Any help would be greatly appreciated.

Thanks,

Kevin

SELECT dbo_ED.edProject AS Project, Sum(IIf
((dbo_ED.edAccount Between "6000" And "64999") And
edProjectCost,edAmount,0)) AS JTDDirOtherCost, Sum(IIf
((dbo_ED.edAccount Between "50000" And "54999") And
edProjectCost,edAmount,0)) AS JTDReimbOtherCost, Sum(IIf
((dbo_ED.edAccount Between "70000" And "79999") And
edProjectCost,edAmount,0)) AS JTDIndCost, Sum(IIf
(edTransType='IN' And (dbo_ED.edAccount>="40000" Or IsNull
(dbo_ED.edAccount)) And nz(edSubType)<>'I' And
dbo_ED.edAutoEntry=False,-dbo_ED.edAmount,0)) AS
JTDTotBill, Sum(IIf(edTransType='CR',-dbo_ED.edAmount,0))
AS JTDRecv
FROM dbo_ED
GROUP BY dbo_ED.edProject;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top