Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Questions
NOT LIKE Operator in a Map
< Previous Thread     Next Thread >
Author
Thread    Post New Thread     Post A Reply
fsilva
Member

Registered: Mar 2004
Posts: 18

Hi,

I need to use the NOT LIKE operator in the Map, but when I put NOT LIKE in the operand of the map, the SQL is generated with an error, the field name an the 'not like' appear together...
I try to put a blank space before 'not like' in the map, and don?t work, the field just disappears.
How can I do this??

[EJB-QL Compiler]: where clause:
CocoPowder:: query = select F1,F2,F3,F4,F5,F6 from (SELECT SGI_CENTRO_RESULTADO.ID AS F1,SGI_CENTRO_RESULTADO.CODIGO AS F2,SGI_CENTRO_RESULTADO.NOME AS F3,SGI_CENTRO_RESULTADO.PRF_ID_GERENTE AS F4,SGI_CENTRO_RESULTADO.CR_ID_PAI AS F5,SGI_CENTRO_RESULTADO.CODIGO_REDUZIDO AS F6 FROM SGI_CENTRO_RESULTADO WHERE SGI_CENTRO_RESULTADO.CODIGOnot like'EXTINTO%') T0

CocoPowder:: Creating new Prepared SQL Statement
CocoPowder:: Exception encountered = java.sql.SQLException: ORA-00904: invalid column name
CocoPowder:: Exception occurred for operation=select mapname=null passedObject = null secondParam=nullException = java.sql.SQLException: ORA-00904: invalid column name

CocoPowder:: Exception occurred for operation=select mapname=$$CBQUERY_2020896_O passedObject = KeyField =CBSQLWHERE value=, secondParam=selectException = java.sql.SQLException: ORA-00904: invalid column name

CocoPowder:: Exception occurred for operation=select mapname=$$CBQUERY_2020896_O passedObject = KeyField =CBSQLWHERE value=, secondParam=selectException = thought.CocoBase.CocoBaseException: CBMessage=Select failed in Database SQL for map=<$$CBQUERY_2020896_O>.CoreMessage=ORA-00904: invalid column name

06-03-2004 06:41 AM
Click Here to See the Profile for fsilva    Find more posts by fsilva        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

Did you hardcode "not like" in the map where clause
operand? It sounds like you did instead of clicking the NOT TRUE checkbox in the where clause, and the Operand should only contain the keyword LIKE.

As for ejb-ql, we tested the NOT LIKE operator with it and it did just fine...

Can you export and email an XML version of your map to our support@thoughtinc.com account so we can verify the setup?

Does this answer your question?

THOUGHT Support

06-03-2004 11:46 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
fsilva
Member

Registered: Mar 2004
Posts: 18

Yes...this answer my question...

But today I think that I do the right thing. I put in the operand only 'like' and I checked the NOT TRUE checkbox, but doesn?t work.
First: I need to put a blank space before like operator or the field name and the 'like' operator still appearing together in the generated SQL.
Second: The NOT TRUE checkbox(checked) made no difference, I checked my XML Repository and the field has in the clause 'nottrue="1"', but the generated SQL doesn't have the negative.
Here is the generated SQL:
CocoPowder:: query = select F1,F2,F3,F4,F5,F6 from (SELECT SGI_CENTRO_RESULTADO.ID AS F1,SGI_CENTRO_RESULTADO.CODIGO AS F2,SGI_CENTRO_RESULTADO.NOME AS F3,SGI_CENTRO_RESULTADO.PRF_ID_GERENTE AS F4,SGI_CENTRO_RESULTADO.CR_ID_PAI AS F5,SGI_CENTRO_RESULTADO.CODIGO_REDUZIDO AS F6 FROM SGI_CENTRO_RESULTADO WHERE SGI_CENTRO_RESULTADO.CODIGO like'EXTINTO%') T0

06-04-2004 01:16 PM
Click Here to See the Profile for fsilva    Find more posts by fsilva        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

Hi,

Are you using a database or an xml repository? Can you export this particular map to xml and send it to us so we can have engineering review it?

Thanks,
THOUGHT Support

06-04-2004 02:06 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
fsilva
Member

Registered: Mar 2004
Posts: 18

I'm using an XML Repository.
I will send this map to support mail.

Thanks

06-04-2004 02:17 PM
Click Here to See the Profile for fsilva    Find more posts by fsilva        Edit/Delete Message    Reply w/Quote    IP: Logged
fsilva
Member

Registered: Mar 2004
Posts: 18

Hi,

I have just exported this map and sent to mail support, and I would like to solve this problem as soon as possible.

Thanks,

06-07-2004 11:37 AM
Click Here to See the Profile for fsilva    Find more posts by fsilva        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

The CBQuery needed updating to support the spacing you were using. An update has been sent to you for testing - and it will be included in the 4.5 SR6 release automatically. Let us know if you have any more questions or issues.

THOUGHT Support

06-08-2004 10:41 AM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread     Next Thread >

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.