cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sub SQL not working

Former Member
0 Kudos

Hello,

I am able to run the 1st pass through SQL

select count(*) as cnt1,

         (select count(*) as cnt2 from table1 where var1 is null)

from table1


However, the 2nd SQL failed with "undefined index" error message.


select count(*) as cnt1,

         (select count(*) as cnt2 from table1 where var1 is null),

         (select count(*) as cnt3 from table1 where var1<0)

from table1


Does anybody know why?



Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member188493
Contributor
0 Kudos

There's no such thing as an "undefined index" in SQL Anywhere.


What product is producing this message?

former_member186998
Contributor
0 Kudos

Hi,


Which version did you use?
I tested this SQL statement in the following environment.

SQL Anywhere 17.0.0.1010 on Windows 8.1

I confirmed the success of both SQL statements(1st, 2nd).

Thanks,

Atsushi