Print Thread
Page 1 of 2 1 2
TOracleScript and MERGE
#9544 10/16/07 11:22 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9545 10/16/07 09:43 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9546 10/18/07 07:15 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9547 10/18/07 05:06 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9548 10/19/07 07:18 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9549 11/05/07 11:57 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
Joined: Oct 2007
Posts: 10
Dear Marco,

Any idea when is the patches for MERGE support in TOraclescript be available ?

Re: TOracleScript and MERGE
#9550 11/05/07 10:42 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
We should have something this week.


Marco Kalter
Allround Automations
Re: TOracleScript and MERGE
#9551 11/15/07 10:43 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
Joined: Oct 2007
Posts: 10
Dear Marco,

Any idea when is the patches for MERGE support in TOraclescript be available ?

Re: TOracleScript and MERGE
#9552 11/15/07 04:57 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9553 11/22/07 07:46 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
Joined: Oct 2007
Posts: 10
eek

Dear Marco,

Hope you can really release the patch soon.

Re: TOracleScript and MERGE
#9554 12/20/07 07:58 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
Joined: Oct 2007
Posts: 10
Dear Marco,

Have you uploaded the patches already ?

Re: TOracleScript and MERGE
#9555 12/20/07 08:55 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9556 01/31/08 08:55 PM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9557 02/01/08 08:21 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9558 02/03/08 10:09 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9559 02/04/08 04:06 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
That is strange. I will check it out today.


Marco Kalter
Allround Automations
Re: TOracleScript and MERGE
#9560 02/04/08 06:49 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#9561 02/05/08 09:03 AM
Joined: Oct 2007
Posts: 10
A
Member
OP Offline
Member
A
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
#9562 02/05/08 04:40 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.040s Queries: 12 (0.009s) Memory: 2.5989 MB (Peak: 3.0420 MB) Data Comp: Off Server Time: 2024-05-20 20:21:26 UTC
Valid HTML 5 and Valid CSS