TOPIC: Subquerry
#1615
Subquerry 9 Months, 2 Weeks ago
Hello!!! I'm a beginner in Suneido. Is possible to use subquerry in Suneido? for example in BrowseControl, AccesControl, etc.
 
 
#1616
Re:Subquerry 9 Months, 2 Weeks ago
What do you mean by "subquery"?

You can have a Browse on an Access, for example for "line" items on invoices. Look at Users Manual > Going Further > Master-Detail Relationship
 
 
andrew
 
#1617
Re:Subquerry 9 Months, 2 Weeks ago
In SQLServer or Sybase, you made a select like this.

select
sucursal = (select nombre from tsg_sucursal r where r.succod = t1.succod),
tipodoc = (select descripcion from trtipdoc r where r.tipdoc = t1.tipdoc),
sistcod,
t1.nombre,
t1.apellido
from tcliente t1

Is possible this in Suneido?
 
 
#1618
Re:Subquerry 9 Months, 2 Weeks ago
I do not know SQL very well so I am not sure what that query is doing.

In Suneido you can "compose" multiple queries e.g. with join or union

But Suneido does not have sub-queries inside a where. You can not say:

mytable where myfield in (... subquery ...)

However, you can do similar things either with join or by using functions or rules.

Does anyone know SQL and Suneido and can answer how you would translate this query?
 
 
andrew