Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (Oracle)
 Oracle 8.1.5.00 CASE in search.asp
 Forum Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

gor
Retired Admin

Netherlands
5511 Posts

Posted - 09 March 2001 :  17:35:36  Show Profile  Visit gor's Homepage
Ok, I can search now using Oracle and even in the CLOB fields.

Another thing is that this search default is Case sensitive.
So if I search for snitz it won't return Snitz
With Oracle the logonname and password are Case sensitive too because of this.

1) Is there a workaround ?

2) Aren't all the other databases by default Case neutral in their SQL statements ?



Pierre<

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 09 March 2001 :  17:41:47  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
lCase/UCase?

----------------
Da_Stimulator
Need a Mod?
My Snitz Test Center
<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 09 March 2001 :  18:48:45  Show Profile
Oracle PLSQL has its own Ucase function. It is the UPPER function here is the syntax using the example in the other post.

SQL> select * from clob1 where dbms_lob.instr(UPPER(clobcol), UPPER('abc'))>0;

that should work... let me know...

h2o

<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 09 March 2001 :  19:03:12  Show Profile  Visit gor's Homepage
Nope, didn't work this time.

Makes sence thought that it didn't work, because clobcol is a reference to a column, and not an actual value, so UPPER(clobcol) doesn't work in this select statement.

Pierre<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 09 March 2001 :  19:20:19  Show Profile
sorry...

let me look around some more.

Edited by - h2o on 09 March 2001 19:21:42<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 10 March 2001 :  20:35:44  Show Profile
Hey gor, I am currently working with oracle directly to find a solution to this... they say that you cannot perform a case insensitive search on a clob using the dbms_lob.instr() function. We are currently working on a PLSQL version of the search. Hopefully we can just subsitute the sql statement with the PLSQL version an that would be it. I will keep you posted.

h2o

<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 11 March 2001 :  04:08:17  Show Profile  Visit gor's Homepage
Great, thanks

Like I said, for this page I wouldn't mind if we had to create a Oracle specific fix, so even something like a stored procedure of function in this case would be acceptable if that was the only way to make it work. I know we don't use stored procedures because we want the code to be as database independent as possible, but if it is the only way to do this...and it only is in this one place.

For now I'm just going to go ahead and change all the other code so we'll have something to test with. I'm going to have to add the changes to the latest alpha after that anyway, I started to code using Alpha 3, but for now just getting it to work would be nice.

Pierre<
Go to Top of Page

THWR
Starting Member

9 Posts

Posted - 13 March 2001 :  04:51:05  Show Profile
Hi

as h2o told, you need to build some pieces of PL/SQL Code. generally (most times with the to_chat function) works upper/lower for you. but not at blob's.


sorry for replying this late...

<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 14 March 2001 :  01:48:53  Show Profile
Ok, I finally spoke with Oracle about the case insesitive search on a CLOB. There are really only two solutions. The fist is probably not one we want to go with. It requires the installion of another Oracle server product named Inter Media (expensive). This will allow you to perform a context search on a CLOB.

The only other thing to do is transfer the CLOB value into a temporary string variable. Then convert the string to uppercase then perform the search. Since you would basically have to batch through all of the replies then move each one to a temp variable then perform the case search you may want to write this in PLSQL. THat way you would not have to pass each record back and forth... it would all be done in Oracle's upper memory... only the records with the target text will be passed back to the .asp application. This would be more CPU expensive, however this may be the only way to implement the search function in Oracle. Let me know what you think.

Sorry it took me so long to respond. I have been working on a WINSOCK application for a homebanking product. Sometimes I hate the TCP stack.

h2o



Edited by - h2o on 14 March 2001 01:54:38<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 March 2001 :  02:39:48  Show Profile  Visit gor's Homepage
The Inter Media option isn't an option I think, unless 99% of the Oracle users also has that. Otherwise it would be useless. Second problem ofcourse is: I don't have it, and I wasn't planning on spending money on Oracle just to support their database.

The second option would be the only option then.
Any chance I could get you to give this a try, doesn't have to be in ASP, if you have a good Visual Basic example I'll probably be able to convert it. Since Oracle is very new to me, comming up with completely new things sometimes just takes a lot more time.



Pierre<
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 14 March 2001 :  07:10:35  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
Uhmmm....since you have to convert a clob to a string to get the search to work, why not just use a varchar field?? In oracle 8i, you can create varchar fields over 64,000 characters (that's the number which sticks in my head, could be much higher). You'd have to check the documentation to get the exact count, but the varchar field should be big enough for our needs....

Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 March 2001 :  07:54:14  Show Profile  Visit gor's Homepage
I think to have read somewhere that the total length of a record has limits also. So that would cause problems in the MEMBERS table (?)
Don't know if I read this with regard to Oracle of Interbase though.

Pierre<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 14 March 2001 :  13:05:12  Show Profile
Good point Dave... is there a character limit for the textarea html controll. If there is and it is less than 4,000 characters (which is the max for vchar2 database field, I think 32,767 is the max for vchar2 type variables in PLSQL) then we may be able to use vchar2. Back when I was posting samples for gor I remember having to post two messages because the first was cut off due to its length. I wonder if this is a database limitiation or if the textare controll has limitations.

Gor, i will attempt to either write or gather a example in VB. I may also be able to write VB code to create the PLSQL procedure.

I will get back to you guys soon...

h2o



<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 March 2001 :  13:20:53  Show Profile  Visit gor's Homepage
The error you got when posting a long topic was a site specific (here at snitz.com) thing. Actually a database specific thing. We're using one of the last pré-setup.asp databases on Sql Server I think

Pierre<
Go to Top of Page

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 14 March 2001 :  15:15:12  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
quote:

If there is and it is less than 4,000 characters (which is the max for vchar2 database field, I think 32,767 is the max for vchar2 type variables in PLSQL)



If I remember correctly, the length of vchar2 database and vchar2 pl/sql variables are now equal in oracle 8i...

Dave Maxwell
--------------
Proud to be a "World Class" Knucklehead<
Go to Top of Page

h2o
Starting Member

46 Posts

Posted - 02 April 2001 :  15:48:40  Show Profile
Hey gor.. how is the case search going?

Edited by - h2o on 02 April 2001 15:53:23<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07