There are some spacing problems (maybe typos in the email, but just to be sure). The statement should be:
SELECT IIF(payment > 10 , NULL,NULL) AS Result from provider However, assuming you are not really returning NULL from both sides of the IIF() I would suggest using a CAST around it to ensure you have a particular field width/type. SELECT CAST(IIF(payment > 10 , NULL,NULL) as N(10,2)) AS Result from provider Disclaimer: Written off the top of my head so the syntax may not be quite right. Frank. Frank Cazabon On 20/01/2012 04:10 PM, Sytze de Boer wrote: > I don't know the answer specifically, but isn't there a bracket missing > before the IIF > > > On Sat, Jan 21, 2012 at 9:06 AM, Jean Haidar<[email protected]> wrote: > >> can we use IIF in SQL syntax. >> >> I am using this simple Statement: >> SELECTIIF (payment> 10 , NULL,NULL)ASResult fromprovider >> >> getting incorrect syntax near '>'. >> >> >> >> but this SQL statement works fine >> Select >> >> any ideas? >> provid,'ProviderID'=casewhenprovID =space(1)THEN''ELSE'smething >> else'ENDfromprovider >> >> --- StripMime Report -- processed MIME parts --- >> multipart/alternative >> text/plain (text body -- kept) >> text/html >> --- >> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

