Akdora’s Blog

Programming, Oracle, Life, Fun

Search In Oracle Tables :) February 5, 2009

Filed under: PL/SQL — Akdora @ 3:06 pm
Tags: , , , , , , , ,

After I write searching code in PL/SQL blocks. I also  want to add this post.

If you want to find a specific data in Tables, you may check this page:

http://www.adp-gmbh.ch/ora/misc/find_in_tables.html

SQL> set serveroutput on
SQL>
SQL> begin
  2    dbms_output.put_line(find_in_schema(val => ‘147 Spadina Ave’));
  3  end;
  4  /
 
  rowid: AAAC88AAEAAAAAnAAI in LOCATIONS
Success
 
PL/SQL procedure successfully completed
 
SQL>

Advertisements
 

Search In Oracle (All_Source, All_Views, All_Triggers) February 4, 2009

Filed under: Oracle,PL/SQL — Akdora @ 8:54 pm
Tags: , , , , , , , , ,

If you want to search some words in the oracle database that you wrote before. You have two options to check out.
Firstly, we checks the ALL_SOURCES table.

SQL> Desc ALL_SOURCE
Name  Type                            Nullable Default Comments                                                                                                     
—– ————–                   ——– ——- ————————————————————————————————————-
OWNER VARCHAR2(30)      Y                Owner of the object                                                                                          
NAME   VARCHAR2(30)       Y                Name of the object                                                                                           
TYPE     VARCHAR2(12)        Y                Type of the object: “TYPE”, “TYPE BODY”, “PROCEDURE”, “FUNCTION”,  “PACKAGE”, “PACKAGE BODY” or “JAVA SOURCE”
LINE      NUMBER                      Y                Line number of this line of source                                                                           
TEXT     VARCHAR2(4000)  Y                Source text   

 

This table includes following types;

FUNCTION
JAVA SOURCE
PACKAGE
PACKAGE BODY
PROCEDURE
TRIGGER
TYPE
TYPE BODY

But, As you see “VIEWS..” are not in the list.!!! So we also check the ALL_VIEWS table.

We should check also ALL_TRIGGERS table 🙂

(more…)

 

Live Combo Search with ExtJS

Filed under: Ajax,ExtJS,Java,PL/SQL — Akdora @ 10:39 am
Tags: , , , , , , , , , , , , , , ,

Live Combo Search with ExtJS

 

If you trying to list thousands of data in a combobox, then you have a problem. I faced this problem a while ago. I was developing the presentation layer with ExtJS. ExtJS has a live search solution for this situation. Check the web page: http://extjs.com/deploy/dev/examples/form/forum-search.html

I will explain the whole story from beginning to end about this online dynamic checkbox control. I will use Oracle XE 10g, Java-Struts with JPS pages and ExtJS. We will pass the data with JSON. You may make some changes in the code. It all depends on you. My metod is just a suggestion.

 

Lets create a procedure that returns a cursor. It also takes an input parameter that’s our search string. We have 60000 rows in  table company. It is also recommended to create an Function-Based Index (FBI) on “lower(t. company_name)”.

s

(more…)