Using Queries in an other Query


Hello.
I want to use or call a query I created, from a new query, like if it was a table. Something like this -->

Query Base

Select * from table1



Query New

Select * from Base
where Base.Id = 2


This is just an example, what I need to do is much more complicated, but I thought I could use my owns queries like any table from my database, and it doesn`t work. Is there something I need to do to have this option? or is just not possible to do it.

Comments

  • edited 7:39PM
    You didn't say enough to describe your issue. But I guess you need to use master-detail relation between two queries. If so give a real exmaple we can work on here or have a look at compiled demo for master-detail reports.

    Mick
  • FRNLFRNL Hoogeveen - Netherlands
    edited 7:39PM
    Mememe wrote: »
    Hello.
    I want to use or call a query I created, from a new query, like if it was a table. Something like this -->

    Query Base

    Select * from table1



    Query New

    Select * from Base
    where Base.Id = 2


    This is just an example, what I need to do is much more complicated, but I thought I could use my owns queries like any table from my database, and it doesn`t work. Is there something I need to do to have this option? or is just not possible to do it.

    What you describe looks like inheritance. I wonder if this at the level of report inheritance.

    But in the 'Query New', I would say: if you need the SQL from the first query, put "Query Base" SQL in a variable and add the condition from code or after a select.

    Best regards,
    Teo

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.