Thanks for help.

I create a query in visual foxpro 9!The sql is:
select a.num,b.doctor;
from (select count(id) as num,cl group by cl) a;
(select count(id) as doctor,cl where dt="doctor" group by cl);
where a.cl=b.cl

It can get the correct data from the table,but it could not be readable by
the query designer.

Whenevery i quit/open the query view there is a messagebox say "Not a
character expression (Error 45)" and there is nothing in query designer.

I wander how to edit/run the sql without the warning.
Or without the designer tool edit the sql in the sql view directly!

Thanks anyway!

Re: Not a character expression (Error 45) by Dan

Dan
Fri Mar 31 10:28:37 CST 2006

The query designer was never intended to build/maintain complex queries.
Until recently, all but the most mundane queries were impossible. It's
better now, but still has limitations. It's just what the tool *is*.

You'll have to maintain this query manually, as source code instead of
visually. You can either MODI COMM your.qpr, because a qpr files is just a
prg in funny clothes, or you can copy the query into a prg file. (I prefer
the latter because it never tempts me to use the query designer, which will
ruin the query.)

Dan

Brhhk wrote:
> Thanks for help.
>
> I create a query in visual foxpro 9!The sql is:
> select a.num,b.doctor;
> from (select count(id) as num,cl group by cl) a;
> (select count(id) as doctor,cl where dt="doctor" group by cl);
> where a.cl=b.cl
>
> It can get the correct data from the table,but it could not be
> readable by the query designer.
>
> Whenevery i quit/open the query view there is a messagebox say "Not a
> character expression (Error 45)" and there is nothing in query
> designer.
>
> I wander how to edit/run the sql without the warning.
> Or without the designer tool edit the sql in the sql view directly!
>
> Thanks anyway!