Support Questions

Find answers, ask questions, and share your expertise

Nested subquery in phoenix

avatar
Contributor

Hi all,

what is wrong ? Env. Hdp 2.4

> phoenix 
CREATE TABLE TB.TABLE1
(
  COL1         VARCHAR(3)                   NOT NULL
 ,COL2         VARCHAR(20)
 ,CONSTRAINT pk PRIMARY KEY (COL1)  
)	









SELECT T.* FROM (
	  SELECT * FROM TB.TABLE1
	) T


SQL Error [1001] [42I01]: ERROR 1001 (42I01): Undefined column family. familyName=T.null
  org.apache.phoenix.schema.ColumnFamilyNotFoundException: ERROR 1001 (42I01): Undefined column family. familyName=T.null
	

Thanks,

1 ACCEPTED SOLUTION

avatar

@Faruk Berksoz -

Below query should work fine:

SELECT * FROM ( SELECT * FROM TB.TABLE1 ) T;

View solution in original post

1 REPLY 1

avatar

@Faruk Berksoz -

Below query should work fine:

SELECT * FROM ( SELECT * FROM TB.TABLE1 ) T;