1 (edited by teco049 2017-02-20 15:32:51)

Topic: Table Grid and multiple SQL Tables.

Hello,
I am trying to fill a TableGrid with a SQL Script. I want to display information from more as one table to the grid.
Something like

Select ID, Date, Company (select id, sum(Badges) from Badgelist) text from Visitors order by Date desc,id desc

I get an Errormessage:

Error message:
only a single result allowed for a SELECT that is part of an expression

I have not yet done an application, only some changings in an existing application.
.
At the forum I have nothing found if it is possible to display in one table grid information from more as one table.
Table 1: List of companies who are visitors
Table 2: List of visitor badges issued to a company.
Table 3: List of visitors on site.
.
Table grid should show:
Record ID   Companyname   issued Badges   Visitors on site
.
EDIT:
.
Correct display should be:
Record ID   Companyname   count(issued Badges)   count(Visitors on site)
.
The last 2 collums should only show the total count, not detailed information.

Re: Table Grid and multiple SQL Tables.

Hello.

Please attach your project (zip file without exe and dll), and let me know name of form where the TableGrid placed.

Dmitry.

Re: Table Grid and multiple SQL Tables.

Hi,
I am currently not at the office, so I have used the free version 1.44 as I have only the company licence and no personal licence.
Table grid is on form1.
It should show for each company how much visitors are registered and how much are on site.
I have used a seach function, but it shows only one line as result.
Any idea how to manage it that it shows like
.
company 1   xx registered    xx on site
company 2   xx registered    xx on site
company 3   xx registered    xx on site
company 4   xx registered    xx on site

Post's attachments

Attachment icon test.zip 3.7 kb, 477 downloads since 2017-02-23 

Re: Table Grid and multiple SQL Tables.

Hello.


I have added calculated fields for that.
Please check it out

Post's attachments

Attachment icon test_fixed.zip 4.22 kb, 545 downloads since 2017-02-27 

Dmitry.

Re: Table Grid and multiple SQL Tables.

DriveSoft wrote:

Hello.


I have added calculated fields for that.
Please check it out

Thank you.