469,903 Members | 2,238 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Informix

any ideas? I get a syntax error. As you can see I'm trying to get some summary data for periodic sales reports. I'm using the IF instead of CASE 'cause it's not supported on the version of Informix

select Sales.sl_store, Sales.sl_date, Store.st_Desc,
if Sales.sl_Date='1/23/2007' Begin Sales.sl_Price End as DlyTYSales,
if Sales.sl_Date='1/23/2006' Begin Sales.sl_Price End as DlyLYSales
From SALES, Stores where Store.st_ID=Sales.sl_Store

Any ideas anyone? Also I had a simple rowset returned ie:

select * from Sales where Sales.sl_Date='1/23/2007'

I' guessing the syntax error is in the IF statement
Jan 24 '07 #1
0 960

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by D. Sandmann | last post: by
3 posts views Thread by Christian Eriksson | last post: by
1 post views Thread by Phil Hindmoor | last post: by
10 posts views Thread by Joachim Banzhaf | last post: by
6 posts views Thread by FireHawkBr® | last post: by
14 posts views Thread by Khan | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.