cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
524
Views
0
Helpful
1
Replies

Select from SQL Server Activity

craigc
Level 1
Level 1

Hi,

I'm using the Select from SQL Server Activity in CPO to look up some values in a table, straightforward SQL queries like select * from Table work 100% but when I start applying a WHERE clause to the query it fails to return the results even though when running query in SQL studio it returns results successfully.

The issue seems to be when trying to use brackets in a OR statement:

The SQL Statement is:

SELECT AppName FROM METADaaS WHERE

NCCX NOT LIKE '%18421%'

AND RTYPE='A'

AND BUNDLEDWITH LIKE '%GOL Back Office%'

AND (NCC = '0' OR NCC LIKE '%18421%')

This returns no results in CPO but in SQL Studio returns the results as expected.

If I remove the "(NCC = '0' OR NCC LIKE '%18421%')" I get results in CPO.

thanks

1 Reply 1

Von Jones
Level 4
Level 4

Any SQL statement should work.  I would suggest you open a TAC case.