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?


LVL 1
chunky1Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kretzschmarConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.