Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADODB from SQLServer - IF function?
Dianne Butterworth wrote:
Googling suggests things like IF, IIF, DECODE, CASE, but I can't seem to put these into practice. Just to clarify, the ANSI standard SQL syntax is CASE, which is supported in SQL Server, so you should use it: http://msdn.microsoft.com/library/de...ca-co_5t9v.asp DECODE is proprietary Oracle syntax. IIF is proprietary Jet (MS Access) syntax. For portability (in the loosest sense) it is best to use the standard syntax but this is not always possible e.g. Jet does not support CASE. Jamie. -- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADODB from SQLServer - IF function?
Jamie,
I had tried CASE, but hadn't realised it required an END. Thanks for the pointer to the MSDN article. I have bookmarked this for future TSQL queries -- very useful! -- Dianne onedaywhen wrote: Dianne Butterworth wrote: Googling suggests things like IF, IIF, DECODE, CASE, but I can't seem to put these into practice. Just to clarify, the ANSI standard SQL syntax is CASE, which is supported in SQL Server, so you should use it: http://msdn.microsoft.com/library/de...ca-co_5t9v.asp DECODE is proprietary Oracle syntax. IIF is proprietary Jet (MS Access) syntax. For portability (in the loosest sense) it is best to use the standard syntax but this is not always possible e.g. Jet does not support CASE. Jamie. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - MS sqlserver 2000 connection | Excel Discussion (Misc queries) | |||
ADODB Recordset Function | Excel Programming | |||
Excel Front End , SqlServer Backend in the web | Excel Programming |