Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

"Select .. From.." in TQuery for many database files...

Posted on 1998-11-09
5
Medium Priority
?
151 Views
Last Modified: 2010-04-04
Hi, Experts!
I'm making special SQL builder for 3 database files of IB Database. I want to know how to write down "Select ... From" command for 3 database IB files without use Aliases.
I use 3 TDataBase components for access IB DataBase files.
0
Comment
Question by:DValery
5 Comments
 

Expert Comment

by:FreeLogin
ID: 1346329
hello DValery.
What do you mean by "Without using Aliases" ?

What is sure, is that you can solve your problem like this :

Select ......
from :Alias1:Table1,:Alias2:Table2,:Alias3:Table3
where ....

where :Alias1: is the name of the first alias inserted between ::


regards
                FreeLogin
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1346330
Hi  DValery,

the Database-property of your Query should have the Alias which shows to your Interbase Database

The Sql-Statement couls be shown as follows

Select a.field, b.field, c.field,... from TableA , TableB b, TableC c where a.Field = b.Field and b.Field=c.Field order by a.field

the word field should contain your fieldnames, by the where-clause the typs of fields should be the same, in order clause you select the sortorder.

meikl
0
 
LVL 1

Expert Comment

by:EmmDieh
ID: 1346331
Look in the help under "Heterogenous queries"
0
 
LVL 1

Author Comment

by:DValery
ID: 1346332
Thanks EmmDieh, for old true: "...read the documentation".
The Help say me:
..
As an alternative to using a BDE alias to specify the database in a heterogeneous query, you can use a TDatabase component. Configure the TDatabase as normal to point to the database, set the TDatabase.DatabaseName to an arbitrary but unique value, and then use that value in the SQL statement instead of a BDE alias name.
..
It is I looking for...
EmmDieh, you can to get 50 points...
0
 
LVL 1

Accepted Solution

by:
EmmDieh earned 150 total points
ID: 1346333
Thanks,
but keep in mind that as far as I know result sets from
multiple databases in heterogenous queries are joined
on the client side which may result in a really low
performance, because a the rows have to be transmitted
over the network.
You can check this with SQL-Monitor.
Consider using one database instead.

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question