• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

How can I execute an SQL covering two paradox alias's

I have the following SQL statement which looks a two databases in two different alias's.

The first table "Version" is in a paradox alias called "cust".

The second table "Versions" is in a paradox alias called "Cust_control".

The Version_type=Version_id links the records in each of the databases.

select Version,version_desc from :cust:version, :cust_control:versions
where Cust_id="47359"
and version_type=version_id

This SQL correctly works within Database explorer, but if I try to run the same statement within an SQL component in delphi I get the error "Invalid use of keyword. token:?, "

Can anyone help me please?


0
chunky1
Asked:
chunky1
  • 2
1 Solution
 
kretzschmarCommented:
select * from
::AliasName1::Tablename1 t1,::AliasName2::Tablename2 t2
where t1.field = t2.field

do not provide a databasename in your query-property

meikl ;-)
0
 
chunky1Author Commented:
Brilliant!

Didn't realise that two sets of colons are required in the Delphi components.

Thankyou.
0
 
kretzschmarCommented:
not delphi requires this, its the bde and its embedded local SQL

glad to helped you

meikl ;-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now