TOracleScript and MERGE

aik hooi

Member²
Dear Marco,

Can TOracleScript parse and recognised MERGE sql syantax ?

From my testing, it seems not recognised MERGE sql command which was introduced in Oracle 9i.

Regards
 
Merge is indeed not recognized as a SQL statement. We'll add it. As a workaround you need to recognize this in the OnCommand event, and pass the statement to the server.
 
when I put this statement in TOracleScript, can the component detect this statement as a whole to be pass into onCommand event ?

merge
into contract a
using customer b
on (a.cust_id = b.cust_id)
when matched then
update set a.desc = b.profile,
a.customer_name = b.cust_name,
when not matched then
insert values ( b.profile,
b.cust_name);

And, do you have any idea when MERGE feature will be included in your next release ?

Reagards

Aik Hooi
 
when I put this statement in TOracleScript, can the component detect this statement as a whole to be pass into onCommand event ?
Good question. I think it would need to be a one-liner.
And, do you have any idea when MERGE feature will be included in your next release ?
That would be in a few weeks. If you let me know your Delphi/C++Builder version, I can upload a patch for you.
 
It would be great if you can upload the patch to me. I am using Delphi 7 and Direct Oracle Access 4.1.0.7. Thanks

Email me at aikhooi99@gmail.com

Regards

Aik Hooi
 
We'll need to roll this into the final 4.1.1 patch release, which includes some additional fixes. It will be available in one or two weeks.
 
Dear Marco,

I used the same SQL Syntax to test the parsing of merge statement in TOracleScript.

merge
into contract a
using customer b
on (a.cust_id = b.cust_id)
when matched then
update set a.desc = b.profile,
a.customer_name = b.cust_name,
when not matched then
insert values ( b.profile,
b.cust_name);

When TOraclescript reach the merge statements, it is able to detect that it is a nonSQL type but only returns "merge" as a command.substitutedtext property and skip the rest of the lines below.

I uninstall and reinstall DOA but it still doesnt work.Hope you can further investigate. Thanks

Regards
 
When TOraclescript reach the merge statements, it is able to detect that it is a nonSQL type but only returns "merge" as a command.substitutedtext property and skip the rest of the lines below.
When I try this statement in a script in 4.1.1, it recognizes MERGE as a SQL statement, and sends it to the server. In 4.1.0 and earlier, it would not have been recognized as a SQL statement.
 
Back
Top