DataStage Case Conditions

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rcil
Charter Member
Charter Member
Posts: 70
Joined: Sat Jun 05, 2004 1:37 am

DataStage Case Conditions

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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%' 
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply