[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Does SQR support the keyword CASE..look at this one
What works in one doesn't necessarily mean it will work in another. SQR is
designed to be database independent. CASE is specific to SQL Server. Here is
another way to find out...try running the query in Oracle, if you can.
Sam
--- chandrashekhar jinna <csjinna@YAHOO.COM> wrote:
> I am trying to use the following select query in my
> SQR program. This query works perfect and produces the
> desired result when I use in my analyzer. But when I
> include it in my SQR it throws an error at CASE.....
> do lemme know how to build the BEGIN-SELECT/END-SELECT
> for this query.
> lemme remind you I built it already with so many
> options but it throws an error in one or the other way
> around CASE.
>
>
> SELECT B.DESCR,
> (CASE WHEN IsNull(CBT.CRSE_RATE_ID,'')=''
> THEN CBT.AMT_PER_UNIT
> ELSE R.AMT_PER_UNIT
> END) AS AMT_PER_UNIT,
> (CASE WHEN IsNull(CBT.CRSE_RATE_ID,'')=''
> THEN CBT.FLAT_AMT
> ELSE R.FLAT_AMT
> END) AS FLAT_AMT,
> CBT.CRSE_RATE_ID
> FROM PS_CLASS_SBFEE_TBL CBT
> INNER JOIN PS_ITEM_TYPE_TBL B ON
> CBT.ITEM_TYPE=B.ITEM_TYPE AND CBT.SETID=B.SETID
> LEFT JOIN PS_CRSE_RATE_TBL R ON
> CBT.CRSE_RATE_ID=R.CRSE_RATE_ID AND CBT.SETID=R.SETID
> WHERE CBT.SETID = 'MATC1'
> AND CBT.STRM = '1014'
> AND CBT.CRSE_ID = '000562'
> AND CBT.CRSE_OFFER_NBR = '1'
> AND (R.ACAD_GROUP='ASSOC' OR IsNull(R.ACAD_GROUP,'')='')
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
=====
************************************************************
"In the beginning, there was something...which exploded yet, they find nothing."
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/