With MS SQL Server the like clause work fine on numeric field .... (field like '%1%') So, I can also set values using quotes. In this case, Field can be declared as Varchar on repository, it should work (I don't know if OJB ask database for table's definition or not, like I think) and you can add your like clause Be carefull if this field is a key or if you have to use auto increment ... ----- Original Message ----- From: "Carsten Spr�ner_Ext" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 10:40 AM Subject: Antwort: How to create a LIKE Statement???
> > Heah? > > i thing the problem is in front of the computer :-) > try a > > select * from CUVZ where CUVZ_CDNR like '%1%' > > CUVZ_CDNR is a DECIMAL-Field. That would result in a Databaseerror (here > db2): > > SQL0440N Im Funktionspfad wurde keine Funktion mit Namen "LIKE" und > kompatiblen Argumenten gefunden. SQLSTATE=42884 > > Seems that you can not use LIKE on a number field. In that case thing about > your data model. > > I thing this is not a OJB problem. It is a database restriction. > > carsten > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
