Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - MS sqlserver 2000 connection wannesh Excel Discussion (Misc queries) 0 February 3rd 06 03:10 PM
ADODB Recordset Function Jim Thomlinson[_3_] Excel Programming 2 December 11th 04 01:31 AM
Excel Front End , SqlServer Backend in the web [email protected] Excel Programming 0 September 30th 03 05:11 PM


All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"