Single vs double quotes


Single vs double quotes

Hello, in the following code , if i replace the single quotes arounf 'credit card' with double quotes, it looks for a column with name 'credit card' . can some one throw some light on how teradata interprets double and single quotes


when appl_for_prod_typ = '30' then  'CreditCard'

when appl_for_prod_typ in ('12','13') then  'Homeline Plan'

when appl_for_prod_typ = '41' then  'Overdraft'

when appl_for_prod_typ = '20' and APPL_FOR_SPCFC_SRVC_TYP = '06' then  'Royal Credit Line - Non Equity'

when APPL_FOR_SPCFC_SRVC_TYP in ('01','02') then  'Personal Loan'

when (appl_for_spcfc_srvc_typ = '09' and appl_for_purps_typ = 'DE') then 'Credit Card Limit Increase'

when (appl_for_prod_typ = '21' and APPL_FOR_SPCFC_SRVC_TYP = '06') then 'RCL Non Equity Limit Increase'

end as product,

Senior Apprentice

Re: Single vs double quotes

It's working as expected by Standard SQL (and similar in most DBMSes):

Single quotes oare string delimiters.

Double quotes are used for identifiers like column & table names. But in Teradata double quoted identifiers are not case sensitive (this is a deviation from Standard SQL)