TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
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
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
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.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
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
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
[quote]when I put this statement in TOracleScript, can the component detect this statement as a whole to be pass into onCommand event ?[/quote]Good question. I think it would need to be a one-liner. [quote]And, do you have any idea when MERGE feature will be included in your next release ?[/quote]That would be in a few weeks. If you let me know your Delphi/C++Builder version, I can upload a patch for you.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
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
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco,
Any idea when is the patches for MERGE support in TOraclescript be available ?
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
We should have something this week.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco,
Any idea when is the patches for MERGE support in TOraclescript be available ?
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
Sorry for the delay, we'll have a patch soon.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco, Hope you can really release the patch soon.
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco,
Have you uploaded the patches already ?
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
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.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco,
Are you releasing the patch soon ? It has been almost 4 months in the making and no news.
Regards
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
The patch release is ready. You can download the Delphi 7 version here . This patch release is not yet published.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
Dear Marco,
Nope.It's not working.
The patch of TOracleScript still cannot parse MERGE statements.
Regards
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
That is strange. I will check it out today.
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
I double-checked, and it works okay. Can you send me your complete script text?
Marco Kalter Allround Automations
|
|
|
Re: TOracleScript and MERGE
|
Joined: Oct 2007
Posts: 10
Member
|
OP
Member
Joined: Oct 2007
Posts: 10 |
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
|
|
|
Re: TOracleScript and MERGE
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
[quote]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.[/quote]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.
Marco Kalter Allround Automations
|
|
|
|
|