Skip to main content
WolfShade
Brainiac
February 13, 2013
Answered

Query of Query - filtering

  • February 13, 2013
  • 1 reply
  • 619 views

Hello, everyone.

I need to do a QoQ and get a COUNT() of the records that fit a certain criteria, using TRIM and UPPER to make sure the match is solid.

In Oracle, it would be SELECT COUNT(*) as TOTALS FROM tableName WHERE UPPER(TRIM(both ' ' FROM columnName)) = 'THISWORD'

But Oracle conventions don't work in QoQ.  What would be the CF QoQ equivalent?  (I'm sure it's something simple and I'm just too tired to see it.)

Thanks,

^_^

    This topic has been closed for replies.
    Correct answer Dan_Bracuk

    Are you sure that will work in Oracle?  Looks like an incomplete subquery to me.

    In any event, "upper" is supported by QofQ.  I know you can do this:

    select count(*)

    from myQuery

    where upper(myField) = 'FRED'

    I've never tried trim before so I don't know if it's supported.

    1 reply

    Dan_BracukCorrect answer
    Inspiring
    February 13, 2013

    Are you sure that will work in Oracle?  Looks like an incomplete subquery to me.

    In any event, "upper" is supported by QofQ.  I know you can do this:

    select count(*)

    from myQuery

    where upper(myField) = 'FRED'

    I've never tried trim before so I don't know if it's supported.

    WolfShade
    WolfShadeAuthor
    Brainiac
    February 13, 2013

    Hi, Dan.

    I'll give the UPPER() a shot.  TRIM(), I'll play around with and report back.

    Much appreciated.

    ^_^

    WolfShade
    WolfShadeAuthor
    Brainiac
    February 13, 2013

    UPPER() worked like a charm.  As far as TRIM() - it's just TRIM(columnName), nothing else.

    Thanks, Dan!

    ^_^