Join On String Ignore Case

Database

Join On String Ignore Case

Hi,

Does anyone know of a better way to do a table join on a string ignoring the case other than doing something like:

join on lower(a.str_col) = lower(b.str_col)

Thanks,
Carl
Tags (1)
6 REPLIES
Enthusiast

Re: Join On String Ignore Case

Hi,

Teradata default mode for character comparison is non case specific and the storage will be done as entered.

If Case specific comparison is needed
join on a.str_col(CS) = b.str_col(CS)
can be used.
WAQ
Enthusiast

Re: Join On String Ignore Case

what does CS meant for?
Enthusiast

Re: Join On String Ignore Case

CS stands for 'Case Specific'

Re: Join On String Ignore Case

Thanks for the info.
Highlighted
Enthusiast

Re: Join On String Ignore Case

Hi, I hace the other way round question:

 

on a CaseSpecific Database, need to do a not-case specific searhc

 

thanks

Teradata Employee

Re: Join On String Ignore Case

If you search on "Teradata case specific" you find pages from the manual like this or this.  They tell us that default case specificity is different in Teradata mode than in ANSI mode, and if the strings being compared were both defined as not case specific, the comparison is not case specific.  To override the default, add the phrase ([NOT] CASE SPECIFIC) to the where-clause.