Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: lubos on April 20, 2010, 10:27:24 pm

Title: OracleOleDB problem?
Post by: lubos on April 20, 2010, 10:27:24 pm
Hello,
I begin to play with oracle and EA.
I connect to DB using Oracle Provider for OLE DB.
I have the following problem:
this SQL query>
select instr('Tag:Value',':') + 1 AS C1 from dual;

returns 5 in PL/SQL Developer
but
returns 41 when using it as as Custom SQL search in EA.

Is this a problem of OLE bridge?
Do you know how to solve it?

Thanks for any hints.
Title: Re: OracleOleDB problem?
Post by: Paolo F Cantoni on April 20, 2010, 11:34:17 pm
Quick look suggests a data typing problem...

try: select instr('Tag:Value',':') + '1' AS C1 from dual;

You should get '41' from both...

(Fingers crossed)  ;)

Isn't software wonderful?

HTH,
Paolo
Title: Re: OracleOleDB problem?
Post by: lubos on April 20, 2010, 11:44:07 pm
OK I haven't described my goal :-)
I want to get  5 in EA search.

Thanks
Title: Re: OracleOleDB problem?
Post by: lubos on April 21, 2010, 12:00:11 am
I have overcome it by:

select instr('Tag:Value',':') - -1    as C1 from dual;

You'are right, software is wonderful ;-)

Still interesting in more appropriate solution...
Title: Re: OracleOleDB problem?
Post by: Geert Bellekens on April 21, 2010, 12:08:22 am
Quote
OK I haven't described my goal :-)
I want to get  5 in EA search.

Thanks

have you tried
Code: [Select]
select 5 as C1 from dual ;D

Geert
Title: Re: OracleOleDB problem?
Post by: Geert Bellekens on April 21, 2010, 04:40:38 pm
For your information,

On SQL Server both (ran through EA search)
Code: [Select]
select CHARINDEX (':', 'Tag:Value') + '1' AS c1and
Code: [Select]
select CHARINDEX (':', 'Tag:Value') + 1 AS c1result in 5

Geert
Title: Re: OracleOleDB problem?
Post by: lubos on April 21, 2010, 06:27:43 pm
It's interesting,
I still have the result 41 in EA search. It seems it's a problem of some driver bridge...
But the hack with '- -' works so I will not continue to try to discover it.

Thanks