Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Query of Query - filtering

LEGEND ,
Feb 13, 2013 Feb 13, 2013

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,

^_^

536
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 13, 2013 Feb 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.

Translate
LEGEND ,
Feb 13, 2013 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 13, 2013 Feb 13, 2013

Hi, Dan.

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

Much appreciated.

^_^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 13, 2013 Feb 13, 2013
LATEST

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

Thanks, Dan!

^_^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources