All Forums Database
kingkong 6 posts Joined 02/15
04 Feb 2015
expected something between the word 'xx' and ','.Unable to get..
select a12.xx  xx,
 a12.bb  bb
from (select a11.zz zz,
 CASE WHEN substring(a11.zz ,2,1)  between '0' and '9' THEN substring(a11.zz,1,1)  ELSE substring(a11.zz,1,2) END zz
from table1  a11) a12
group by a12.xx,
 a12.bb

Hi
 
I am new to terradata and get the following error when running the above sql.
'expected something between the word  ... and ,  unable to get catalogue string
any input will be greatly appreciated.
 
many thanks
 
 

MaximeV 19 posts Joined 11/13
05 Feb 2015

You select xx and bb from a12 but there's no column named this way on your a12 subquery.
 
btw your two columns are named zz on a12 subquery, shouldn't work too.

hemanth.gudela 10 posts Joined 01/15
05 Feb 2015

Hi, I think you are trying something like this..?

select a12.xx  xx,
 a12.bb  bb
from (select a11.zz xx,
 CASE WHEN substr(a11.zz, 2, 1)  between '0' and '9' THEN substr(a11.zz, 1, 1)  ELSE substr(a11.zz, 1, 2) END bb
from table1  a11) a12
group by a12.xx,
 a12.bb

Regards

-Hemanth Gudela

You must sign in to leave a comment.