Not
AFAIK. Why don't you return DOCTYPE and DOCAMT and test DOCTYPE in Excel
and negate DOCAMT if ="RET".
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"dchow" wrote in message
...
I was trying to send a SQL query using ODBC to fill my worksheet with
some invoice information. In the Amount field I want it to be in
negative if the doc type is RETURN. So I did:
Select DOCNUM as Document,
DOCDATE as DocDate,
IIF(DOCTYPE="RET", -DOCAMT, DOCAMT) as Amount
From TableName
I was complaining about SQL syntax error. If I removed the IIF line
it worked fine. Does SQL support IIF?