Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Using a CASE statement in another spreadsheet?

Hi,
I'm selecting from another spreadsheet via ODBC, and want to use a CASE
function in the select statement, to short cut some summing up.

Is something like this possible (heres a cut down version)?
SELECT ActualApr05, case when ActualApr05 <0 then ActualApr05 else 0 end as
QT105 FROM forecastcosts

The statement above returns the following error:
[Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query
expression 'case when ActualApr05 <0 then ActualApr05 else 0 end'.

Any ideas?
Many thanks in advance
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
Case Statement jlclyde Excel Discussion (Misc queries) 3 December 4th 08 05:04 PM
Select Case Statement Katie Excel Worksheet Functions 13 December 1st 08 07:32 PM
IF STATMENT OR CASE STATEMENT Richard Excel Discussion (Misc queries) 2 January 10th 07 10:04 AM
Case Statement Help stck2mlon Excel Programming 3 June 2nd 04 01:44 PM
Case statement smi Excel Programming 2 October 18th 03 02:20 PM


All times are GMT +1. The time now is 02:47 PM.

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

About Us

"It's about Microsoft Excel"