Page 1 of 1

DataStage Case Conditions

Posted: Wed May 11, 2005 4:16 pm
by rcil
Hello All,

I am using teradata as my source stage which is not case specific meaning which will get you ABC and abc when you do a query like where col1 = 'ABC' unless you use the caseSpecific funtion for the specific case.

The question I have here is when I try to use the terdata stage and write user define sql like


When I do the query on database like

SELECT COL1,COL2 FROM TABLE1 WHERE COL1 LIKE '%abc%' OR '%cdb%'.

it gives me all the existing results available in that column
abc,Abc,ABC.......

But as the datastage is case sensitive it is not retreiving all the possible values. Is there anyway that I can get all the possible values instead of saying in the where col2 like '%ABC%' or '%abc%'.

thanks

Posted: Wed May 11, 2005 5:43 pm
by ray.wurlod
Change your SQL to include an UPPER (or is it UPCASE in Teradata) function.

Code: Select all

SELECT COL1,COL2 FROM TABLE1 WHERE UPPER(COL1) LIKE '%ABC%'